Dropdown will not trigger @on-click event when set disabled prop to D…

This commit is contained in:
mo.duan 2019-09-06 15:21:55 +08:00
parent 730eba8adb
commit 434db3c909

View file

@ -37,15 +37,10 @@
},
methods: {
handleClick () {
if (this.disabled) return;
const $parent = findComponentUpward(this, 'Dropdown');
const hasChildren = this.$parent && this.$parent.$options.name === 'Dropdown';
if (this.disabled) {
this.$nextTick(() => {
$parent.currentVisible = true;
});
return;
} else if (hasChildren) {
if (hasChildren) {
this.$parent.$emit('on-haschild-click');
} else {
if ($parent && $parent.$options.name === 'Dropdown') {