vue实例销毁前有必要调用unmount()方法吗? #10270
Unanswered
xingzilong
asked this question in
Help/Questions
Replies: 1 comment 3 replies
-
需要的。 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我现在使用createApp()创建了很多vue实例,并且挂载到了我指定的dom节点上。
后续我会有对相关dom节点的删除,我手动删除dom的时候并没有对vue实例做额外的操作。
但是删除dom后,我在vue的浏览器开发者工具上看到还是有多个vue实例的存在。这种情况是vue实例没有被销毁吗?还是说vue开发者工具有bug?
这种情况我需要在删除相关dom之前,先调用unmount()方法吗?
Beta Was this translation helpful? Give feedback.
All reactions