mirror of https://github.com/ElemeFE/element
Dialog: fix incorrect updatePopper calls
parent
dfe8972e2c
commit
f9b19d9aa1
|
@ -16,7 +16,9 @@
|
||||||
mixins: [Popper],
|
mixins: [Popper],
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.$on('updatePopper', this.updatePopper);
|
this.$on('updatePopper', () => {
|
||||||
|
if (this.showPopper) this.updatePopper();
|
||||||
|
});
|
||||||
this.$on('visible', val => {
|
this.$on('visible', val => {
|
||||||
this.showPopper = val;
|
this.showPopper = val;
|
||||||
});
|
});
|
||||||
|
|
|
@ -57,7 +57,9 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.referenceElm = this.$parent.$refs.reference.$el;
|
this.referenceElm = this.$parent.$refs.reference.$el;
|
||||||
this.$parent.popperElm = this.popperElm = this.$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);
|
this.$on('destroyPopper', this.destroyPopper);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue