This commit is contained in:
梁灏 2017-03-27 10:48:18 +08:00
parent fc0c4c7815
commit 70d5a4ab80
3 changed files with 16 additions and 44 deletions

View file

@ -1,35 +1,26 @@
<template> <template>
<div> <div>
<Dropdown> <Dropdown @on-click="handleClick">
<a href="javascript:void(0)"> <a href="javascript:void(0)">
下拉菜单 下拉菜单
<Icon type="arrow-down-b"></Icon> <Icon type="arrow-down-b"></Icon>
</a> </a>
<Dropdown-menu slot="list"> <Dropdown-menu slot="list">
<Dropdown-item>驴打滚</Dropdown-item> <Dropdown-item name="1">驴打滚</Dropdown-item>
<Dropdown-item>炸酱面</Dropdown-item> <Dropdown-item name="2">炸酱面</Dropdown-item>
<Dropdown-item disabled>豆汁儿</Dropdown-item> <Dropdown-item name="3" disabled>豆汁儿</Dropdown-item>
<Dropdown-item>冰糖葫芦</Dropdown-item> <Dropdown-item name="4">冰糖葫芦</Dropdown-item>
<Dropdown-item divided>北京烤鸭</Dropdown-item> <Dropdown-item name="5" divided>北京烤鸭</Dropdown-item>
</Dropdown-menu>
</Dropdown>
<Dropdown style="margin-left: 20px">
<Button type="primary">
下拉菜单
<Icon type="arrow-down-b"></Icon>
</Button>
<Dropdown-menu slot="list">
<Dropdown-item>驴打滚</Dropdown-item>
<Dropdown-item>炸酱面</Dropdown-item>
<Dropdown-item disabled>豆汁儿</Dropdown-item>
<Dropdown-item>冰糖葫芦</Dropdown-item>
<Dropdown-item divided>北京烤鸭</Dropdown-item>
</Dropdown-menu> </Dropdown-menu>
</Dropdown> </Dropdown>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
methods: {
handleClick (val) {
console.log(val)
}
}
} }
</script> </script>

View file

@ -1,26 +1,8 @@
<template> <template>
<div> <div>
<Radio-group v-model="phone"> <Radio-group v-model="sex">
<Row> <Radio :label="0"></Radio>
<i-col span="8"> <Radio :label="1"></Radio>
<Radio label="apple">
<Icon type="social-apple"></Icon>
<span>Apple</span>
</Radio>
</i-col>
<i-col span="8">
<Radio label="android">
<Icon type="social-android"></Icon>
<span>Android</span>
</Radio>
</i-col>
<i-col span="8">
<Radio label="windows">
<Icon type="social-windows"></Icon>
<span>Windows</span>
</Radio>
</i-col>
</Row>
</Radio-group> </Radio-group>
</div> </div>
</template> </template>
@ -28,8 +10,7 @@
export default { export default {
data () { data () {
return { return {
phone: 'apple', sex: 0
animal: '爪哇犀牛'
} }
} }
} }

View file

@ -83,7 +83,7 @@
this.currentValue = checked; this.currentValue = checked;
this.$emit('input', checked); this.$emit('input', checked);
if (this.group && this.label) { if (this.group && this.label !== undefined) {
this.parent.change({ this.parent.change({
value: this.label, value: this.label,
checked: this.value checked: this.value