Blame view

examples/routers/checkbox.vue 1.82 KB
cbe03a12   梁灏   support Checkbox
1
2
  <template>
      <div>
77f1cc2e   梁灏   Checkbox add size...
3
4
5
6
7
8
9
10
11
12
13
14
          <Checkbox
              :indeterminate="true"
              :value="false"
              size="large">全选</Checkbox>
          <Checkbox
                  :indeterminate="true"
                  :value="false"
                  size="default">全选</Checkbox>
          <Checkbox
                  :indeterminate="true"
                  :value="false"
                  size="small">全选</Checkbox>
a81253ec   Rijn   Update checkbox t...
15
          <div>
77f1cc2e   梁灏   Checkbox add size...
16
17
18
              <Checkbox size="large" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox>
              <Checkbox true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox>
              <Checkbox size="small" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox>
a81253ec   Rijn   Update checkbox t...
19
20
21
22
23
24
              {{ testValue1 }}
          </div>
          <div>
              <Checkbox :true-value="0" :false-value="1" v-model="testValue2">test number</Checkbox>
              {{ testValue2 }}
          </div>
77f1cc2e   梁灏   Checkbox add size...
25
          <Checkbox-group v-model="fruit" size="large">
a81253ec   Rijn   Update checkbox t...
26
              <Checkbox v-for="item in tags" :label="item.label" :key="item.label" true-value="true"></Checkbox>
cbe03a12   梁灏   support Checkbox
27
          </Checkbox-group>
01b8d340   梁灏   fixed #778
28
          <div>{{ fruit }}</div>
cbe03a12   梁灏   support Checkbox
29
30
31
32
33
34
35
36
      </div>
  </template>
  <script>
      export default {
          data () {
              return {
                  social: ['facebook', 'github'],
                  fruit: ['苹果'],
a81253ec   Rijn   Update checkbox t...
37
38
39
                  tags: [],
                  testValue1: null,
                  testValue2: null
cbe03a12   梁灏   support Checkbox
40
41
              }
          },
01b8d340   梁灏   fixed #778
42
43
44
45
46
47
48
49
50
51
52
53
54
55
          mounted () {
              setTimeout(() => {
                  this.tags = [
                      {
                          label: '香蕉'
                      },
                      {
                          label: '苹果'
                      },
                      {
                          label: '西瓜'
                      }
                  ]
              }, 1000);
cbe03a12   梁灏   support Checkbox
56
57
58
          }
      }
  </script>