Blame view

test/routers/select.vue 1.63 KB
e355dd49   梁灏   add Select Component
1
  <template>
d94d98c4   梁灏   fixed #215
2
3
      <Row>
          <i-col span="12" style="padding-right:10px">
4e85fa15   YikaJ   pr: #256
4
5
              <i-select :model.sync="model111" filterable>
                  <i-option v-for="item in cityList1" :value="item.value">{{ item.label }}</i-option>
d94d98c4   梁灏   fixed #215
6
7
              </i-select>
          </i-col>
4e85fa15   YikaJ   pr: #256
8
9
10
11
12
13
14
15
16
      </Row>
      <Row>
          <i-col span="12" style="padding-right:10px">
              <i-select :model.sync="model112" filterable>
                  <i-option v-for="item in cityList2" :value="item.value">{{ item.label }}</i-option>
              </i-select>
          </i-col>
      </Row>
      <Row>
d94d98c4   梁灏   fixed #215
17
18
          <i-col span="12">
              <i-select :model.sync="model12" filterable multiple>
4e85fa15   YikaJ   pr: #256
19
                  <i-option v-for="item in cityList1" :value="item.value">{{ item.label }}</i-option>
d94d98c4   梁灏   fixed #215
20
21
22
              </i-select>
          </i-col>
      </Row>
e355dd49   梁灏   add Select Component
23
24
  </template>
  <script>
4e85fa15   YikaJ   pr: #256
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
  const cityList = [
      {
          value: 'beijing',
          label: '北京市'
      },
      {
          value: 'shanghai',
          label: '上海市'
      },
      {
          value: 'shenzhen',
          label: '深圳市'
      },
      {
          value: 'hangzhou',
          label: '杭州市'
      },
      {
          value: 'nanjing',
          label: '南京市'
      },
      {
          value: 'chongqing',
          label: '重庆市'
      }
  ]
e355dd49   梁灏   add Select Component
51
      export default {
e355dd49   梁灏   add Select Component
52
53
          data () {
              return {
4e85fa15   YikaJ   pr: #256
54
55
56
57
58
59
                  cityList1: cityList,
                  model111: '',
  
                  cityList2: [],
                  model112: 'beijing',
  
d94d98c4   梁灏   fixed #215
60
                  model12: []
e355dd49   梁灏   add Select Component
61
              }
4e85fa15   YikaJ   pr: #256
62
63
64
65
66
67
          },
          ready() {
            this.model111 = 'hangzhou'
            setTimeout(()=>{
              this.cityList2 = cityList
            }, 500)
e355dd49   梁灏   add Select Component
68
69
          }
      }
3e855e34   梁灏   fixed #46
70
  </script>