Blame view

examples/routers/switch.vue 485 Bytes
2af5843d   梁灏   Switch add large ...
1
  <template>
2d5ba278   梁灏   support Switch
2
3
4
5
6
7
8
9
      <div>
          <i-switch v-model="m1">
              <span slot="open">开</span>
              <span slot="close">关</span>
          </i-switch>
          {{ m1 }}
          <div @click="m1 = !m1">toggle</div>
      </div>
2af5843d   梁灏   Switch add large ...
10
11
  </template>
  <script>
2af5843d   梁灏   Switch add large ...
12
      export default {
2af5843d   梁灏   Switch add large ...
13
14
          data () {
              return {
2d5ba278   梁灏   support Switch
15
                  m1: false
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>