Blame view

examples/routers/checkbox.vue 833 Bytes
cbe03a12   梁灏   support Checkbox
1
2
  <template>
      <div>
cbe03a12   梁灏   support Checkbox
3
          <Checkbox-group v-model="fruit">
cb6418ac   梁灏   fixed #721
4
              <Checkbox v-for="item in tags" :label="item.label" :key="item"></Checkbox>
cbe03a12   梁灏   support Checkbox
5
          </Checkbox-group>
01b8d340   梁灏   fixed #778
6
          <div>{{ fruit }}</div>
cbe03a12   梁灏   support Checkbox
7
8
9
10
11
12
13
14
      </div>
  </template>
  <script>
      export default {
          data () {
              return {
                  social: ['facebook', 'github'],
                  fruit: ['苹果'],
01b8d340   梁灏   fixed #778
15
                  tags: []
cbe03a12   梁灏   support Checkbox
16
17
              }
          },
01b8d340   梁灏   fixed #778
18
19
20
21
22
23
24
25
26
27
28
29
30
31
          mounted () {
              setTimeout(() => {
                  this.tags = [
                      {
                          label: '香蕉'
                      },
                      {
                          label: '苹果'
                      },
                      {
                          label: '西瓜'
                      }
                  ]
              }, 1000);
cbe03a12   梁灏   support Checkbox
32
33
34
          }
      }
  </script>