[bugfix] DropdownMenu: cann't use toggle to open item (#3876)
This commit is contained in:
@@ -40,19 +40,17 @@ export default createComponent({
|
||||
},
|
||||
|
||||
methods: {
|
||||
toggle(show) {
|
||||
this.showPopup = !this.showPopup;
|
||||
|
||||
if (this.showPopup) {
|
||||
this.showWrapper = true;
|
||||
toggle(show = !this.showPopup, options = {}) {
|
||||
if (show === this.showPopup) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
hide(skipTransition) {
|
||||
this.showPopup = false;
|
||||
this.transition = !options.immediate;
|
||||
this.showPopup = show;
|
||||
|
||||
if (skipTransition) {
|
||||
this.transition = false;
|
||||
if (show) {
|
||||
this.parent.updateOffset();
|
||||
this.showWrapper = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -120,7 +118,6 @@ export default createComponent({
|
||||
onClose={this.onClose}
|
||||
onOpened={this.onOpened}
|
||||
onClosed={() => {
|
||||
this.transition = true;
|
||||
this.showWrapper = false;
|
||||
this.$emit('closed');
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user