File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ export default {
142142 document .addEventListener (Config .EVENT_OPEN , function () {
143143 this .botOpen ()
144144 })
145+ document .addEventListener (Config .EVENT_CLOSE , function () {
146+ this .botClose ()
147+ })
148+ document .addEventListener (Config .EVENT_TOGGLE , function () {
149+ this .botToggle ()
150+ })
145151 },
146152
147153 beforeDestroy () {
@@ -155,6 +161,12 @@ export default {
155161 }
156162 },
157163
164+ botClose () {
165+ if (this .botActive ) {
166+ this .botToggle ()
167+ }
168+ },
169+
158170 botToggle () {
159171 this .botActive = ! this .botActive
160172
Original file line number Diff line number Diff line change 11export default {
2- EVENT_OPEN : 'botui-open'
2+ EVENT_OPEN : 'botui-open' ,
3+ EVENT_CLOSE : 'botui-close' ,
4+ EVENT_TOGGLE : 'botui-toggle'
35}
You can’t perform that action at this time.
0 commit comments