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