element [bug report] [dialog] after setting the destroy-on-close attribute, if you need to use the pop-up box that depends on Popper internally, the second call will fail

gc0ot86w  于 3个月前  发布在  其他
关注(0)|答案(2)|浏览(69)

Element UI version

2.13.2

OS/Browsers version

Windows10 / Chrome 82

Vue version

2.6.11

https://codepen.io/linkontoask/pen/MWaRPEV

Steps to reproduce

1,打开弹框,鼠标移入到按钮上,关闭弹框
2,再次打开弹框,鼠标移入到按钮上,会发现弹框的位置并不是预期的

阅读源码时发现 referenceElm 没有得到及时的更新,我怀疑是dialog的key导致的,因为设置 destroy-on-close 属性后,只改变了组件的key

What is Expected?

在预期的位置显示弹框

What is actually happening?

未正确的显示弹框

kkih6yb8

kkih6yb81#

Translation of this issue:

Element UI version

2.13.2

OS/Browsers version

Windows10 / Chrome 82

Vue version

2.6.11

https://codepen.io/linkontoask/pen/MWaRPEV

Steps to reproduce

  1. Open the pop-up box, move the mouse over the button and close the pop-up box
  2. Open the pop-up box again and move the mouse over the button. You will find that the position of the pop-up box is not expected
    When reading the source code, I found that 'referenceelm' was not updated in a timely manner. I suspect it was caused by the key of the dialog, because after setting the 'destroy on close' attribute, only the key of the component was changed

What is Expected?

Display the pop-up box in the expected position

What is actually happening?

Incorrect pop-up display

xam8gpfp

xam8gpfp2#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题