Blame view

examples/routers/cascader.vue 1.08 KB
47a7f21d   梁灏   support Cascader
1
  <template>
687c4562   梁灏   fixed #810
2
3
      <div style="width: 300px;margin: 100px;">
          <Cascader :data="data2" v-model="v1" change-on-select></Cascader>
47a7f21d   梁灏   support Cascader
4
      </div>
0a48ac45   梁灏   Input add readonl...
5
6
  </template>
  <script>
0a48ac45   梁灏   Input add readonl...
7
      export default {
0a48ac45   梁灏   Input add readonl...
8
9
          data () {
              return {
687c4562   梁灏   fixed #810
10
                  v1: ['zhejiang'],
65b41a2d   梁灏   fixed #635
11
12
13
14
15
16
17
18
19
20
21
22
23
24
                  data2: [{
                      value: 'zhejiang',
                      label: '浙江',
                      children: [{
                          value: 'hangzhou',
                          label: '杭州',
                          children: [{
                              value: 'xihu',
                              label: '西湖'
                          }]
                      }]
                  }, {
                      value: 'jiangsu',
                      label: '江苏',
65b41a2d   梁灏   fixed #635
25
                      children: [{
48af1359   梁灏   fixed #553
26
27
                          value: 'nanjing',
                          label: '南京',
65b41a2d   梁灏   fixed #635
28
29
30
31
32
33
34
                          children: [{
                              value: 'zhonghuamen',
                              label: '中华门'
                          }]
                      }]
                  }]
              }
0a48ac45   梁灏   Input add readonl...
35
36
          }
      }
c9433dcc   梁灏   optimize Timeline...
37
  </script>