current position:Home>[Help] In the vue2 that the vue3 project is connected to as a subsystem, the whole project using el-drawer reports an error?

[Help] In the vue2 that the vue3 project is connected to as a subsystem, the whole project using el-drawer reports an error?

2022-08-06 17:39:52segmentfault

The vue3 project has a module that uses the el-drawer drawer. When the drawer is opened and then closed, an error will be reported when other modules are opened
image.png

The function of the project is intact, that is, after the drawer is closed, and then click on other pages, each page will report this error

On the Internet it is said to be the problem of using v-if, but I didn't use it
On the Internet it is also said to be the problem of rendering, but I added :destory-on-close to no avail,

The most important thing is that I have no problem locally, and there is no problem in the simulated test environment, but there is a problem once deployed to the test environment.



Other Answer 1:

If you click to switch a page that is not the current sub-application, it should trigger the unmount of the sub-application

You can try to destroy the vue instance when the sub-application is unmount to see if it works


Other Answers 2:
I have no problem locally, and there is no problem in the simulated test environment, but there is a problem as soon as it is deployed to the test environment

Is it possible that the development environment and the test environment are packaged inconsistently?
You look in and see who xxx.getAttribute reports the error xxx, think about why it is null, whether it is overwritten or caused by the incompatibility of vue2vue3api calls.Best to post a screenshot

copyright notice
author[segmentfault],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/218/202208021412406112.html

Random recommended