iview [Bug Report] Modal and V-IF instructions cannot be ejected for a second time

tpgth1q7  于 2022-11-19  发布在  其他
关注(0)|答案(4)|浏览(216)

Environment

win10/chrome70/2.6.9

https://run.iviewui.com/3SVm7EEM

Steps to reproduce

  1. v-if 渲染一个 Modal,使用 watch 观测是否渲染;
  2. 点击按钮显示弹框;点击“确定”按钮隐藏弹框;
  3. 再次点击“确定”按钮,无法再次弹框。

What is expected?

  1. 关闭弹框后,弹框相关HTML不在渲染(目前有垃圾回收BUG,会造成内存泄露);
  2. 再次点击按钮可以弹框。

What is actually happening?

  1. 关闭弹框后,HTML页面内存不回收
  2. 无法再次弹框

可能和 v-transfer-dom 指令有关

mccptt67

mccptt671#

Translation of this issue:

Environment

Win10/chrome70/2.6.9

https://run.iviewui.com/3SVm7EEM

Steps to reproduce

  1. V-IF renders a Modal and uses watch to observe whether it is rendered or not.
  2. Click the button to display the cartridge; click the "OK" button to hide the cartridge;
  3. Click the "OK" button again, and you can't bounce the box again.

What is expected?

  1. After closing the cartridge frame, the HTML related to the cartridge frame is not rendered (at present, garbage collection BUG will cause memory leak);
  2. Click the button again to bounce the box.

What is actually happening?

  1. After closing the bullet-box, the memory of HTML pages is not recycled.
  2. Can't bounce again

Possibly related to the v-transfer-dom instruction

ars1skjm

ars1skjm3#

请问下是基于什么原因把 modal设计为不支持v-if的。为什么要设计成永久组件,而不可以用v-if设置为实时渲染的组件。

5cnsuln7

5cnsuln74#

同问,如果在modal使用v-if,初次渲染时动画也会随之消失,modal直接渲染完成,没有了原先的过度动画

相关问题