Commit 60d06ab9 by liimin

1

1 parent 4cfbdc2d
...@@ -10,11 +10,10 @@ ...@@ -10,11 +10,10 @@
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,
removeOnDestroy: true
}" }"
:reference="reference" :reference="reference"
@hide="hide()" @hide="hide()"
...@@ -69,16 +68,18 @@ export default { ...@@ -69,16 +68,18 @@ export default {
methods: { methods: {
mouseenter(reference, onReady) { mouseenter(reference, onReady) {
this.showPop = false this.showPop = false
this.reference = reference
this.$nextTick(() => { this.$nextTick(() => {
// 等待显示的popover销毁后再 重新渲染新的popover this.reference = reference
this.showPop = true
this.$nextTick(() => { this.$nextTick(() => {
// 此时才能获取refs引用 // 等待显示的popover销毁后再 重新渲染新的popover
this.$refs.pop.doShow() this.showPop = true
this.$nextTick(() => { this.$nextTick(() => {
onReady() // 此时才能获取refs引用
this.$nextTick(() => this.$refs.pop.updatePopper()) this.$refs.pop.doShow()
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!