update Dropdown
update Dropdown
This commit is contained in:
parent
5557dd66f5
commit
6b71ba9418
3 changed files with 63 additions and 11 deletions
|
@ -37,13 +37,15 @@
|
|||
methods: {
|
||||
handleClick () {
|
||||
const $parent = this.$parent.$parent;
|
||||
const hasChildren = this.$parent && this.$parent.$options.name === 'Dropdown';
|
||||
if (this.disabled) {
|
||||
this.$nextTick(() => {
|
||||
$parent.visible = true;
|
||||
});
|
||||
} else if (hasChildren) {
|
||||
this.$parent.$emit('on-haschild-click');
|
||||
} else {
|
||||
if ($parent.trigger === 'hover') {
|
||||
$parent.visible = false;
|
||||
if ($parent && $parent.$options.name === 'Dropdown') {
|
||||
$parent.$emit('on-hover-click');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue