Blame view

examples/routers/select.vue 1.38 KB
e355dd49   梁灏   add Select Component
1
  <template>
60314959   梁灏   fixed #1743 and c...
2
      <div>
1f41c9ca   梁灏   fixed #1797
3
4
5
6
7
8
          <Select v-model="model1" style="width:200px">
              <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
          </Select>
          <Select v-model="model2" style="width:200px">
              <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
          </Select>
60314959   梁灏   fixed #1743 and c...
9
      </div>
e355dd49   梁灏   add Select Component
10
  </template>
e355dd49   梁灏   add Select Component
11
  <script>
e355dd49   梁灏   add Select Component
12
      export default {
e355dd49   梁灏   add Select Component
13
14
          data () {
              return {
1f41c9ca   梁灏   fixed #1797
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
                  cityList: [
                      {
                          value: 'beijing',
                          label: '北京市'
                      },
                      {
                          value: 'shanghai',
                          label: '上海市'
                      },
                      {
                          value: 'shenzhen',
                          label: '深圳市'
                      },
                      {
                          value: 'hangzhou',
                          label: '杭州市'
                      },
                      {
                          value: 'nanjing',
                          label: '南京市'
                      },
                      {
                          value: 'chongqing',
                          label: '重庆市'
                      }
                  ],
                  model1: 'beijing',
                  model2: 'shanghai'
e355dd49   梁灏   add Select Component
43
              }
e355dd49   梁灏   add Select Component
44
45
          }
      }
219e5c92   梁灏   fixed #957
46
  </script>