demo.vue
1.44 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template lang="html">
<div class="financial_manager">
<!-- <p>请选择</p> -->
<selectPage :text="text" :checkedList="checked" :list="list" @change-text="changeText" @change="selected"></selectPage>
</div>
</template>
<script>
import selectPage from './index.vue'
export default {
components: {
selectPage
},
data () {
return {
text: '',
checked: ['002', '003'],
list: [
{
id: '001',
value: '肉'
},
{
id: '002',
value: '青菜'
},
{
id: '003',
value: '啤酒'
},
{
id: '004',
value: '水果'
},
{
id: '005',
value: '水果'
},
{
id: '006',
value: '水果'
},
{
id: '007',
value: '水果'
},
{
id: '008',
value: '水果'
},
{
id: '009',
value: '水果'
},
{
id: '010',
value: '水果'
},
{
id: '011',
value: '水果'
}
]
}
},
methods: {
selected (id) {
console.warn(id);
},
changeText (val) {
this.text = val;
}
}
}
</script>
<style lang="less">
</style>