Commit 4e85fa156c2acd9f247baaffabe2df245f2d105d
Committed by
GitHub
1 parent
f789787f
pr: #256
#256 test
Showing
1 changed file
with
50 additions
and
30 deletions
Show diff stats
test/routers/select.vue
1 | 1 | <template> |
2 | 2 | <Row> |
3 | 3 | <i-col span="12" style="padding-right:10px"> |
4 | - <i-select :model.sync="model11" filterable> | |
5 | - <i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option> | |
4 | + <i-select :model.sync="model111" filterable> | |
5 | + <i-option v-for="item in cityList1" :value="item.value">{{ item.label }}</i-option> | |
6 | 6 | </i-select> |
7 | 7 | </i-col> |
8 | + </Row> | |
9 | + <Row> | |
10 | + <i-col span="12" style="padding-right:10px"> | |
11 | + <i-select :model.sync="model112" filterable> | |
12 | + <i-option v-for="item in cityList2" :value="item.value">{{ item.label }}</i-option> | |
13 | + </i-select> | |
14 | + </i-col> | |
15 | + </Row> | |
16 | + <Row> | |
8 | 17 | <i-col span="12"> |
9 | 18 | <i-select :model.sync="model12" filterable multiple> |
10 | - <i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option> | |
19 | + <i-option v-for="item in cityList1" :value="item.value">{{ item.label }}</i-option> | |
11 | 20 | </i-select> |
12 | 21 | </i-col> |
13 | 22 | </Row> |
14 | 23 | </template> |
15 | 24 | <script> |
25 | +const cityList = [ | |
26 | + { | |
27 | + value: 'beijing', | |
28 | + label: '北京市' | |
29 | + }, | |
30 | + { | |
31 | + value: 'shanghai', | |
32 | + label: '上海市' | |
33 | + }, | |
34 | + { | |
35 | + value: 'shenzhen', | |
36 | + label: '深圳市' | |
37 | + }, | |
38 | + { | |
39 | + value: 'hangzhou', | |
40 | + label: '杭州市' | |
41 | + }, | |
42 | + { | |
43 | + value: 'nanjing', | |
44 | + label: '南京市' | |
45 | + }, | |
46 | + { | |
47 | + value: 'chongqing', | |
48 | + label: '重庆市' | |
49 | + } | |
50 | +] | |
16 | 51 | export default { |
17 | 52 | data () { |
18 | 53 | return { |
19 | - cityList: [ | |
20 | - { | |
21 | - value: 'beijing', | |
22 | - label: '北京市' | |
23 | - }, | |
24 | - { | |
25 | - value: 'shanghai', | |
26 | - label: '上海市' | |
27 | - }, | |
28 | - { | |
29 | - value: 'shenzhen', | |
30 | - label: '深圳市' | |
31 | - }, | |
32 | - { | |
33 | - value: 'hangzhou', | |
34 | - label: '杭州市' | |
35 | - }, | |
36 | - { | |
37 | - value: 'nanjing', | |
38 | - label: '南京市' | |
39 | - }, | |
40 | - { | |
41 | - value: 'chongqing', | |
42 | - label: '重庆市' | |
43 | - } | |
44 | - ], | |
45 | - model11: '', | |
54 | + cityList1: cityList, | |
55 | + model111: '', | |
56 | + | |
57 | + cityList2: [], | |
58 | + model112: 'beijing', | |
59 | + | |
46 | 60 | model12: [] |
47 | 61 | } |
62 | + }, | |
63 | + ready() { | |
64 | + this.model111 = 'hangzhou' | |
65 | + setTimeout(()=>{ | |
66 | + this.cityList2 = cityList | |
67 | + }, 500) | |
48 | 68 | } |
49 | 69 | } |
50 | 70 | </script> | ... | ... |