iview/examples/routers/switch.vue
2017-09-03 10:59:23 +08:00

24 lines
512 B
Vue

<template>
<div>
<i-switch v-model="m1" :true-value="1" :false-value="0">
<span slot="open"></span>
<span slot="close"></span>
</i-switch>
{{ m1 }}
<div @click="m1 = 0">toggle</div>
</div>
</template>
<script>
export default {
data () {
return {
m1: 1
}
},
methods: {
change (status) {
console.log(status)
}
}
}
</script>