Commit 39e6e965639ba1c6d5033aa494452ba9079338a1
1 parent
e9ba11a5
fixed checkbox bug in vue.js 1.0.27
fixed checkbox bug in vue.js 1.0.27
Showing
3 changed files
with
17 additions
and
3 deletions
Show diff stats
components/checkbox/checkbox-group.vue
local/routers/index.vue
@@ -3,19 +3,32 @@ | @@ -3,19 +3,32 @@ | ||
3 | </style> | 3 | </style> |
4 | <template> | 4 | <template> |
5 | <div>welcome</div> | 5 | <div>welcome</div> |
6 | + <Checkbox-group :model.sync="fruit"> | ||
7 | + <Checkbox value="香蕉"></Checkbox> | ||
8 | + <Checkbox value="苹果"></Checkbox> | ||
9 | + <Checkbox value="西瓜"></Checkbox> | ||
10 | + </Checkbox-group> | ||
11 | + {{ fruit | json }} | ||
12 | + <Button @click="update">update fruit</Button> | ||
6 | </template> | 13 | </template> |
7 | <script> | 14 | <script> |
15 | + import { Checkbox, Icon, Button } from 'iview'; | ||
16 | + const CheckboxGroup = Checkbox.Group; | ||
17 | + | ||
8 | export default { | 18 | export default { |
19 | + components: { Checkbox, CheckboxGroup, Icon, Button }, | ||
9 | props: { | 20 | props: { |
10 | 21 | ||
11 | }, | 22 | }, |
12 | data () { | 23 | data () { |
13 | return { | 24 | return { |
14 | - | 25 | + fruit: ['苹果'] |
15 | } | 26 | } |
16 | }, | 27 | }, |
17 | methods: { | 28 | methods: { |
18 | - | 29 | + update () { |
30 | + this.fruit = ['香蕉', '西瓜'] | ||
31 | + } | ||
19 | } | 32 | } |
20 | } | 33 | } |
21 | </script> | 34 | </script> |
package.json
1 | { | 1 | { |
2 | "name": "iview", | 2 | "name": "iview", |
3 | - "version": "0.9.0", | 3 | + "version": "0.9.1", |
4 | "title": "iView", | 4 | "title": "iView", |
5 | "description": "A high quality UI components Library with Vue.js", | 5 | "description": "A high quality UI components Library with Vue.js", |
6 | "homepage": "http://www.iviewui.com", | 6 | "homepage": "http://www.iviewui.com", |