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
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue