Blame view

examples/routers/radio.vue 1.25 KB
7fa943eb   梁灏   init
1
2
  <template>
      <div>
06322514   梁灏   support Radio
3
4
5
          <Radio v-model="single" @on-change="c">Radio</Radio>
          <Radio-group v-model="phone" type="button" @on-change="c">
              <Radio label="apple">
7d7221ec   梁灏   optimize Radio si...
6
7
8
                  <Icon type="social-apple"></Icon>
                  <span>Apple</span>
              </Radio>
06322514   梁灏   support Radio
9
              <Radio label="android">
7d7221ec   梁灏   optimize Radio si...
10
11
12
                  <Icon type="social-android"></Icon>
                  <span>Android</span>
              </Radio>
06322514   梁灏   support Radio
13
              <Radio label="windows">
7d7221ec   梁灏   optimize Radio si...
14
15
16
17
                  <Icon type="social-windows"></Icon>
                  <span>Windows</span>
              </Radio>
          </Radio-group>
06322514   梁灏   support Radio
18
19
20
21
          <Radio-group v-model="animal">
              <Radio label="金斑蝶"></Radio>
              <Radio label="爪哇犀牛"></Radio>
              <Radio label="印度黑羚"></Radio>
7d7221ec   梁灏   optimize Radio si...
22
          </Radio-group>
06322514   梁灏   support Radio
23
24
25
          {{ phone }}
          <div @click="phone = 'apple'">apple</div>
          <div @click="single = true"> single</div>{{ single }}
7fa943eb   梁灏   init
26
      </div>
7fa943eb   梁灏   init
27
28
  </template>
  <script>
7fa943eb   梁灏   init
29
      export default {
7fa943eb   梁灏   init
30
31
          data () {
              return {
4925f85f   梁灏   add Radio UI
32
                  phone: 'apple',
6c5fbd8b   梁灏   add Checkbox UI
33
                  animal: '爪哇犀牛',
06322514   梁灏   support Radio
34
                  single: false
7fa943eb   梁灏   init
35
36
              }
          },
7fa943eb   梁灏   init
37
          methods: {
06322514   梁灏   support Radio
38
              c (data) {
9d69bab6   梁灏   add Alert component
39
                  console.log(data)
7fa943eb   梁灏   init
40
              }
7fa943eb   梁灏   init
41
42
          }
      }
e1134de2   jingsam   not bundle vue in...
43
  </script>