Blame view

test/routers/more.vue 652 Bytes
7fa943eb   梁灏   init
1
  <template>
c1f6da1f   梁灏   fixed CheckboxGro...
2
3
4
5
6
7
8
      {{ fruit |json}}
      <Checkbox-group :model.sync="fruit" @on-change="changed">
          <Checkbox value="a"></Checkbox>
          <Checkbox value="b"></Checkbox>
          <Checkbox value="c"></Checkbox>
      </Checkbox-group>
      <i-button @click="change">change</i-button>
7fa943eb   梁灏   init
9
10
  </template>
  <script>
7fa943eb   梁灏   init
11
      export default {
c1f6da1f   梁灏   fixed CheckboxGro...
12
13
14
15
16
          data () {
              return {
                  fruit: ['b']
              }
          },
6e572d44   梁灏   fixed #133
17
          methods: {
c1f6da1f   梁灏   fixed CheckboxGro...
18
19
20
              change () {
                  this.fruit.splice(0, 1);
  //                this.fruit = ['a']
6e572d44   梁灏   fixed #133
21
              },
c1f6da1f   梁灏   fixed CheckboxGro...
22
23
              changed (s) {
                  console.log(s)
6e572d44   梁灏   fixed #133
24
25
              }
          }
7fa943eb   梁灏   init
26
      }
e1134de2   jingsam   not bundle vue in...
27
  </script>