Blame view

examples/routers/radio.vue 900 Bytes
7fa943eb   梁灏   init
1
2
  <template>
      <div>
d24f5082   Rijn   Support trueValue...
3
          <Radio true-value="true" false-value="false" v-model="testValue">test</Radio> {{ testValue }}
d270488b   梁灏   update readme
4
          <Radio-group v-model="date.sex">
bb1f58e2   梁灏   update Radio
5
              <div v-if="show">
d24f5082   Rijn   Support trueValue...
6
7
                  <Radio label="male" true-value="true" false-value="false"></Radio>
                  <Radio label="female" true-value="true" false-value="false"></Radio>
bb1f58e2   梁灏   update Radio
8
              </div>
7d7221ec   梁灏   optimize Radio si...
9
          </Radio-group>
d24f5082   Rijn   Support trueValue...
10
          {{ date }}
d270488b   梁灏   update readme
11
          <Button @click="handleChange">change</Button>
7fa943eb   梁灏   init
12
      </div>
7fa943eb   梁灏   init
13
14
  </template>
  <script>
7fa943eb   梁灏   init
15
      export default {
7fa943eb   梁灏   init
16
17
          data () {
              return {
d270488b   梁灏   update readme
18
                  date: {
bb1f58e2   梁灏   update Radio
19
20
                      sex: 'male'
                  },
d24f5082   Rijn   Support trueValue...
21
22
                  show: false,
                  testValue: null
d270488b   梁灏   update readme
23
24
25
26
              }
          },
          methods: {
              handleChange () {
bb1f58e2   梁灏   update Radio
27
28
  //                this.date.sex = 'male form';
                  this.show = true;
7fa943eb   梁灏   init
29
              }
7fa943eb   梁灏   init
30
31
          }
      }
e1134de2   jingsam   not bundle vue in...
32
  </script>