iview/test/routers/more.vue

28 lines
652 B
Vue
Raw Normal View History

2016-09-09 14:29:19 +08:00
<template>
{{ fruit |json}}
<Checkbox-group :model.sync="fruit" @on-change="changed">
<Checkbox value="a"></Checkbox>
<Checkbox value="b"></Checkbox>
<Checkbox value="c"></Checkbox>
</Checkbox-group>
<i-button @click="change">change</i-button>
2016-09-09 14:29:19 +08:00
</template>
<script>
export default {
data () {
return {
fruit: ['b']
}
},
2016-12-19 09:05:31 +08:00
methods: {
change () {
this.fruit.splice(0, 1);
// this.fruit = ['a']
2016-12-19 09:05:31 +08:00
},
changed (s) {
console.log(s)
2016-12-19 09:05:31 +08:00
}
}
2016-09-09 14:29:19 +08:00
}
2016-11-09 18:23:17 +08:00
</script>