demo.vue
996 Bytes
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
<template lang="html">
<div class="">
<confirm
:title="title"
:value="show"
:left_text="left_text"
:right_text="right_text"
@on-cancel="onCancel"
@on-confirm="onConfirm"
@on-show="onShow"
@on-hide="onHide">
自定义插入内容
</confirm>
<group>
<x-switch title="测试开关" v-model="show"></x-switch>
</group>
</div>
</template>
<script>
import confirm from 'components/confirm/index'
import { Group, XSwitch } from 'vux'
export default {
components: { confirm, Group, XSwitch },
data () {
return {
title: '温馨提示',
left_text: '下一步',
right_text: '继续',
show: false
}
},
mounted () {
},
methods: {
onCancel () {
console.warn('on-cancel');
},
onConfirm (msg) {
console.warn('on-confirm', msg);
},
onHide () {
console.warn('on-hide');
},
onShow () {
console.warn('on-show');
}
}
}
</script>
<style lang="less">
</style>