Blame view

examples/routers/switch.vue 520 Bytes
2af5843d   梁灏   Switch add large ...
1
  <template>
2d5ba278   梁灏   support Switch
2
      <div>
1f41c9ca   梁灏   fixed #1797
3
          <i-switch v-model="m1" true-value="yes" false-value="no">
2d5ba278   梁灏   support Switch
4
5
6
7
              <span slot="open">开</span>
              <span slot="close">关</span>
          </i-switch>
          {{ m1 }}
1f41c9ca   梁灏   fixed #1797
8
          <div @click="m1 = 'no'">toggle</div>
2d5ba278   梁灏   support Switch
9
      </div>
2af5843d   梁灏   Switch add large ...
10
11
  </template>
  <script>
2af5843d   梁灏   Switch add large ...
12
      export default {
2af5843d   梁灏   Switch add large ...
13
14
          data () {
              return {
1f41c9ca   梁灏   fixed #1797
15
                  m1: 'yes'
2af5843d   梁灏   Switch add large ...
16
17
18
19
              }
          },
          methods: {
              change (status) {
2d5ba278   梁灏   support Switch
20
                  console.log(status)
2af5843d   梁灏   Switch add large ...
21
22
23
24
              }
          }
      }
  </script>