mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 04:39:09 +08:00
Dialog: fix incorrect updatePopper calls
This commit is contained in:
parent
dfe8972e2c
commit
f9b19d9aa1
@ -16,7 +16,9 @@
|
||||
mixins: [Popper],
|
||||
|
||||
created() {
|
||||
this.$on('updatePopper', this.updatePopper);
|
||||
this.$on('updatePopper', () => {
|
||||
if (this.showPopper) this.updatePopper();
|
||||
});
|
||||
this.$on('visible', val => {
|
||||
this.showPopper = val;
|
||||
});
|
||||
|
@ -57,7 +57,9 @@
|
||||
mounted() {
|
||||
this.referenceElm = this.$parent.$refs.reference.$el;
|
||||
this.$parent.popperElm = this.popperElm = this.$el;
|
||||
this.$on('updatePopper', this.updatePopper);
|
||||
this.$on('updatePopper', () => {
|
||||
if (this.$parent.visible) this.updatePopper();
|
||||
});
|
||||
this.$on('destroyPopper', this.destroyPopper);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user