-
Notifications
You must be signed in to change notification settings - Fork 94
/
VDynamicAdvanced.vue
61 lines (59 loc) 路 1.39 KB
/
VDynamicAdvanced.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
<v-button class="mb-4" highlight @click="dynamic">Open Dynamic Modal</v-button>
</template>
<script>
import VDescription from '../VDescription.vue'
export default {
methods: {
dynamic() {
this.$modal.show({
component: 'CustomModal',
bind: {
name: 'VDynamicAdvacedModal'
},
on: {
// event by custom-modal
confirm(close) {
console.log('confirm')
close()
},
cancel(close) {
console.log('cancel')
close()
},
// event by vue-final-modal
'click-outside'() {
console.log('@click-outside')
},
'before-open'() {
console.log('@before-open')
},
opened() {
console.log('@opened')
},
'before-close'() {
console.log('@before-close')
},
closed() {
console.log('@closed')
}
},
slots: {
title: {
component: 'VTitle',
bind: {
text: 'Hello, vue-final-modal'
}
},
default: {
component: VDescription,
bind: {
content: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
}
}
}
})
}
}
}
</script>