Commit 8665c529 by liimin

1

1 parent 5c6b0c9f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
ref="pop" ref="pop"
:append-to-body="true" :append-to-body="true"
:popper-options="{ :popper-options="{
boundariesElement: 'viewport', boundariesElement: 'body',
gpuAcceleration: true, gpuAcceleration: true,
positionFixed: true, positionFixed: true,
preventOverflow: true preventOverflow: true
...@@ -68,19 +68,17 @@ export default { ...@@ -68,19 +68,17 @@ export default {
methods: { methods: {
mouseenter(reference, onReady) { mouseenter(reference, onReady) {
this.showPop = false this.showPop = false
this.reference = reference
this.$nextTick(() => { this.$nextTick(() => {
this.reference = reference
this.$nextTick(() => { this.$nextTick(() => {
// 等待显示的popover销毁后再 重新渲染新的popover
this.showPop = true
this.$nextTick(() => { this.$nextTick(() => {
// 等待显示的popover销毁后再 重新渲染新的popover // 此时才能获取refs引用
this.showPop = true this.$refs.pop.doShow()
this.$nextTick(() => { this.$nextTick(() => {
// 此时才能获取refs引用 onReady()
this.$refs.pop.doShow() this.$nextTick(() => this.$refs.pop.updatePopper())
this.$nextTick(() => {
onReady()
this.$nextTick(() => this.$refs.pop.updatePopper())
})
}) })
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!