fixed checkbox bug in vue.js 1.0.27
fixed checkbox bug in vue.js 1.0.27
This commit is contained in:
parent
e9ba11a569
commit
39e6e96563
3 changed files with 17 additions and 3 deletions
|
@ -35,6 +35,7 @@
|
|||
});
|
||||
},
|
||||
change (data) {
|
||||
this.model = data;
|
||||
this.$emit('on-change', data);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,19 +3,32 @@
|
|||
</style>
|
||||
<template>
|
||||
<div>welcome</div>
|
||||
<Checkbox-group :model.sync="fruit">
|
||||
<Checkbox value="香蕉"></Checkbox>
|
||||
<Checkbox value="苹果"></Checkbox>
|
||||
<Checkbox value="西瓜"></Checkbox>
|
||||
</Checkbox-group>
|
||||
{{ fruit | json }}
|
||||
<Button @click="update">update fruit</Button>
|
||||
</template>
|
||||
<script>
|
||||
import { Checkbox, Icon, Button } from 'iview';
|
||||
const CheckboxGroup = Checkbox.Group;
|
||||
|
||||
export default {
|
||||
components: { Checkbox, CheckboxGroup, Icon, Button },
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
fruit: ['苹果']
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
update () {
|
||||
this.fruit = ['香蕉', '西瓜']
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iview",
|
||||
"version": "0.9.0",
|
||||
"version": "0.9.1",
|
||||
"title": "iView",
|
||||
"description": "A high quality UI components Library with Vue.js",
|
||||
"homepage": "http://www.iviewui.com",
|
||||
|
|
Loading…
Add table
Reference in a new issue