Skip to content

Commit ae6d701

Browse files
committed
Update: add new event to open the board manually
1 parent 3dad37f commit ae6d701

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/components/BotUI.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
</template>
3939
<script>
4040
import EventBus from '../helpers/event-bus'
41+
import Config from '../config'
4142
import BoardHeader from './Board/Header'
4243
import BoardContent from './Board/Content'
4344
import BoardAction from './Board/Action'
@@ -137,6 +138,12 @@ export default {
137138
}
138139
},
139140
141+
mounted () {
142+
document.addEventListener(Config.EVENT_OPEN, function () {
143+
this.botOpen()
144+
})
145+
},
146+
140147
beforeDestroy () {
141148
EventBus.$off('select-button-option')
142149
},

src/config/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
EVENT_OPEN: 'botui-open'
3+
}

0 commit comments

Comments
 (0)