Element: [Bug Report] Dialog contents not destroyed even with :destroy-on-close="true"

Created on 17 Dec 2019  ·  5Comments  ·  Source: ElemeFE/element

Element UI version

2.13.0

OS/Browsers version

Chrome Version 79.0.3945.79

Vue version

2.6.11

Reproduction Link

https://codepen.io/hollowcast/pen/MWYbQBw

Steps to reproduce

Create a dialog with option :destroy-on-close="true"

What is Expected?

Contents of the dialog should be destroyed after it closes. (Similar to the behavior of drawer destroy on close)

What is actually happening?

Contents are not destroyed.

Most helpful comment

Is there a way to solve this now?

All 5 comments

Since your Form value is entered and determined, the value of the Form still exists when the dialog element is destroyed, and will be re-assigned when you reopen it

Is there a way to solve this now?

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.

use v-if to solve?

v-if can solve the problem

Was this page helpful?
0 / 5 - 0 ratings