Commit bb1f58e20305f28166cdc401951061d15dd57466
1 parent
f89dd9c2
update Radio
Showing
2 changed files
with
11 additions
and
5 deletions
Show diff stats
examples/routers/radio.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | 3 | <Radio-group v-model="date.sex"> |
4 | - <Radio label="male form"></Radio> | |
5 | - <Radio label="female"></Radio> | |
4 | + <div v-if="show"> | |
5 | + <Radio label="male"></Radio> | |
6 | + <Radio label="female"></Radio> | |
7 | + </div> | |
6 | 8 | </Radio-group> |
7 | 9 | <Button @click="handleChange">change</Button> |
8 | 10 | </div> |
... | ... | @@ -12,13 +14,15 @@ |
12 | 14 | data () { |
13 | 15 | return { |
14 | 16 | date: { |
15 | - sex: '' | |
16 | - } | |
17 | + sex: 'male' | |
18 | + }, | |
19 | + show: false | |
17 | 20 | } |
18 | 21 | }, |
19 | 22 | methods: { |
20 | 23 | handleChange () { |
21 | - this.date.sex = 'male form'; | |
24 | +// this.date.sex = 'male form'; | |
25 | + this.show = true; | |
22 | 26 | } |
23 | 27 | } |
24 | 28 | } | ... | ... |