How to realize the function of pop-up window in vue.js
This article will explain in detail how to achieve the pop-up window function of vue.js. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The method of realizing pop-up window by vue.js: [document.addEventListener ('mouseup', (e) = > {var _ con = document.getElementById (' children-view') if (_ c...]).
The operating environment of this paper: windows10 system, vue.js 2.9, thinkpad T480 computer.
The idea of realization is:
After clicking, click on another location to jump the route, and after the route is redirected, use the computed attribute to monitor $route to show and hide the class, using the js Contains method.
Implementation code:
Document.addEventListener ('mouseup', (e) = > {var _ con = document.getElementById (' children-view') if (_ con & &! _ con.contains (e.target) {this.$route.push ({name: "Index")}) about how to achieve pop-up window function is shared here. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.