Browse Source

Merge pull request #1364 from QingWei-Li/fix/popper

Popper: fix not destroy in keep-alive mode, fixed #1359
baiyaaaaa 8 năm trước cách đây
mục cha
commit
c5c5bbba9e
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      src/utils/vue-popper.js

+ 5 - 0
src/utils/vue-popper.js

@@ -152,5 +152,10 @@ export default {
     this.popperElm &&
     this.popperElm.parentNode === document.body &&
     document.body.removeChild(this.popperElm);
+  },
+
+  // call destroy in keep-alive mode
+  deactivated() {
+    this.$options.beforeDestroy[0].call(this);
   }
 };