当前位置:网站首页>How does vue clear the tab switching cache problem?

How does vue clear the tab switching cache problem?

2022-08-10 13:55:00 segmentfault

image.png

When closing the tab bar, close the current list input box content without retaining data




Accepted answer 1:

The component is bound to a Key, and when the tab is closed, let the key+1
The next time the diff will create a new component, the data will be gone



Other Answer 1:

The component is bound to a Key, and when the tab is closed, let the key+1
The next time the diff will create a new component, the data will be gone


Other Answers 2:

This general component will not be destroyed, so you have to manually call the resetFields method of the form.

原网站

版权声明
本文为[segmentfault]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208101027396235.html