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 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <Radio-group v-model="date.sex"> | 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 | </Radio-group> | 8 | </Radio-group> |
7 | <Button @click="handleChange">change</Button> | 9 | <Button @click="handleChange">change</Button> |
8 | </div> | 10 | </div> |
@@ -12,13 +14,15 @@ | @@ -12,13 +14,15 @@ | ||
12 | data () { | 14 | data () { |
13 | return { | 15 | return { |
14 | date: { | 16 | date: { |
15 | - sex: '' | ||
16 | - } | 17 | + sex: 'male' |
18 | + }, | ||
19 | + show: false | ||
17 | } | 20 | } |
18 | }, | 21 | }, |
19 | methods: { | 22 | methods: { |
20 | handleChange () { | 23 | handleChange () { |
21 | - this.date.sex = 'male form'; | 24 | +// this.date.sex = 'male form'; |
25 | + this.show = true; | ||
22 | } | 26 | } |
23 | } | 27 | } |
24 | } | 28 | } |
src/components/radio/radio.vue