Commit 70d5a4ab80ff73b234f15e543ed469e042272878
1 parent
fc0c4c78
fixed #425
Showing
3 changed files
with
16 additions
and
44 deletions
Show diff stats
examples/routers/dropdown.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | - <Dropdown> | |
3 | + <Dropdown @on-click="handleClick"> | |
4 | 4 | <a href="javascript:void(0)"> |
5 | 5 | 下拉菜单 |
6 | 6 | <Icon type="arrow-down-b"></Icon> |
7 | 7 | </a> |
8 | 8 | <Dropdown-menu slot="list"> |
9 | - <Dropdown-item>驴打滚</Dropdown-item> | |
10 | - <Dropdown-item>炸酱面</Dropdown-item> | |
11 | - <Dropdown-item disabled>豆汁儿</Dropdown-item> | |
12 | - <Dropdown-item>冰糖葫芦</Dropdown-item> | |
13 | - <Dropdown-item divided>北京烤鸭</Dropdown-item> | |
14 | - </Dropdown-menu> | |
15 | - </Dropdown> | |
16 | - <Dropdown style="margin-left: 20px"> | |
17 | - <Button type="primary"> | |
18 | - 下拉菜单 | |
19 | - <Icon type="arrow-down-b"></Icon> | |
20 | - </Button> | |
21 | - <Dropdown-menu slot="list"> | |
22 | - <Dropdown-item>驴打滚</Dropdown-item> | |
23 | - <Dropdown-item>炸酱面</Dropdown-item> | |
24 | - <Dropdown-item disabled>豆汁儿</Dropdown-item> | |
25 | - <Dropdown-item>冰糖葫芦</Dropdown-item> | |
26 | - <Dropdown-item divided>北京烤鸭</Dropdown-item> | |
9 | + <Dropdown-item name="1">驴打滚</Dropdown-item> | |
10 | + <Dropdown-item name="2">炸酱面</Dropdown-item> | |
11 | + <Dropdown-item name="3" disabled>豆汁儿</Dropdown-item> | |
12 | + <Dropdown-item name="4">冰糖葫芦</Dropdown-item> | |
13 | + <Dropdown-item name="5" divided>北京烤鸭</Dropdown-item> | |
27 | 14 | </Dropdown-menu> |
28 | 15 | </Dropdown> |
29 | 16 | </div> |
30 | 17 | </template> |
31 | 18 | <script> |
32 | 19 | export default { |
33 | - | |
20 | + methods: { | |
21 | + handleClick (val) { | |
22 | + console.log(val) | |
23 | + } | |
24 | + } | |
34 | 25 | } |
35 | 26 | </script> | ... | ... |
examples/routers/radio.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | - <Radio-group v-model="phone"> | |
4 | - <Row> | |
5 | - <i-col span="8"> | |
6 | - <Radio label="apple"> | |
7 | - <Icon type="social-apple"></Icon> | |
8 | - <span>Apple</span> | |
9 | - </Radio> | |
10 | - </i-col> | |
11 | - <i-col span="8"> | |
12 | - <Radio label="android"> | |
13 | - <Icon type="social-android"></Icon> | |
14 | - <span>Android</span> | |
15 | - </Radio> | |
16 | - </i-col> | |
17 | - <i-col span="8"> | |
18 | - <Radio label="windows"> | |
19 | - <Icon type="social-windows"></Icon> | |
20 | - <span>Windows</span> | |
21 | - </Radio> | |
22 | - </i-col> | |
23 | - </Row> | |
3 | + <Radio-group v-model="sex"> | |
4 | + <Radio :label="0">男</Radio> | |
5 | + <Radio :label="1">女</Radio> | |
24 | 6 | </Radio-group> |
25 | 7 | </div> |
26 | 8 | </template> |
... | ... | @@ -28,8 +10,7 @@ |
28 | 10 | export default { |
29 | 11 | data () { |
30 | 12 | return { |
31 | - phone: 'apple', | |
32 | - animal: '爪哇犀牛' | |
13 | + sex: 0 | |
33 | 14 | } |
34 | 15 | } |
35 | 16 | } | ... | ... |
src/components/radio/radio.vue