-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp.vue
41 lines (40 loc) · 969 Bytes
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
<div class="page">
<h1>Hello Crisp Chat !</h1>
<button @click="load">Load</button>
<button @click="toggle">Toggle</button>
<button @click="open">Open</button>
<button @click="close">Close</button>
<button @click="show">Show</button>
<button @click="hide">Hide</button>
</div>
</template>
<script>
export default {
methods: {
load() {
this.$crisp.load(CRISP_WEBSITE_ID)
},
toggle() {
this.$crisp.do("chat:toggle")
},
open() {
this.$crisp.do("chat:open")
},
close() {
this.$crisp.do("chat:close")
},
show() {
this.$crisp.do("chat:show")
},
hide() {
this.$crisp.do("chat:hide")
}
},
created() {
this.$crisp.$on('loaded', () => {
console.log('crisp chat is loaded !')
})
}
}
</script>