From a4a0701ab531d3b06ae4139fb40991901dbd8698 Mon Sep 17 00:00:00 2001 From: baiyaaaaa Date: Fri, 12 Aug 2016 12:19:06 +0800 Subject: [PATCH] update autocomplete --- package.json | 3 +-- packages/dropdown/src/dropdown-menu.vue | 6 ++--- packages/dropdown/src/dropdown.vue | 36 +++++++++++++------------ 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 412dc35d2..b793af8d3 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,8 @@ "purecss": "^0.6.0", "q": "^1.4.1", "uppercamelcase": "^1.1.0", - "vue": "^2.0.0-beta.7", "vue-loader": "^9.3.2", - "vue": "^2.0.0-beta.8", + "vue": "^2.0.0-rc.1", "vue-markdown-loader": "^0.4.0", "vue-popup": "^0.2.1", "vue-router": "^2.0.0-beta.2" diff --git a/packages/dropdown/src/dropdown-menu.vue b/packages/dropdown/src/dropdown-menu.vue index e5dda0697..2e0e3063a 100644 --- a/packages/dropdown/src/dropdown-menu.vue +++ b/packages/dropdown/src/dropdown-menu.vue @@ -24,17 +24,15 @@ } } }, - ready() { + mounted() { document.body.appendChild(this.$el); - // this.$el.appendTo('body'); this.$nextTick(() => { this.popper = new Popper(this.$parent.$el, this.$el, { gpuAcceleration: false, placement: `bottom-${this.menuAlign}` }); }); }, - beforeDestroy() { - this.$remove(); + destroyed() { setTimeout(() => { this.popper.destroy(); }, 300); diff --git a/packages/dropdown/src/dropdown.vue b/packages/dropdown/src/dropdown.vue index a43ffe771..6cefa8340 100644 --- a/packages/dropdown/src/dropdown.vue +++ b/packages/dropdown/src/dropdown.vue @@ -1,34 +1,36 @@