support Dropdown
support Dropdown
This commit is contained in:
parent
1c803cdfb0
commit
b1c118d85e
10 changed files with 91 additions and 48 deletions
|
@ -5,8 +5,9 @@
|
|||
const prefixCls = 'ivu-dropdown-item';
|
||||
|
||||
export default {
|
||||
name: 'DropdownItem',
|
||||
props: {
|
||||
key: {
|
||||
name: {
|
||||
type: [String, Number]
|
||||
},
|
||||
disabled: {
|
||||
|
@ -36,7 +37,7 @@
|
|||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
const $parent = this.$parent.$parent;
|
||||
const $parent = this.$parent.$parent.$parent;
|
||||
const hasChildren = this.$parent && this.$parent.$options.name === 'Dropdown';
|
||||
|
||||
if (this.disabled) {
|
||||
|
@ -50,7 +51,7 @@
|
|||
$parent.$emit('on-hover-click');
|
||||
}
|
||||
}
|
||||
$parent.$emit('on-click', this.key);
|
||||
$parent.$emit('on-click', this.name);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue