Commit f9b19d9a authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Dialog: fix incorrect updatePopper calls

parent dfe8972e
...@@ -16,7 +16,9 @@ ...@@ -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 @@ ...@@ -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);
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment