Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does mount mean in vuejs

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you what the meaning of mounting in vuejs means, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The process of establishing a relationship between a virtual dom and a real dom and letting the Vue instance control an area of the page is called mount. Mounting methods are: 1, through the "el:'css selector'" statement for configuration; 2, through the "Vue instance. $mount (" css selector ")" statement for configuration.

The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.

The word mount comes from the concept of the operating system, which originally means to establish a relationship between the virtual file system and the hardware driver, and indirectly manipulate the real files by operating the virtual file system. For example, the essence of U disk operation is to establish a mapping relationship with real U disk files through the virtual file system. The file additions, deletions, changes and queries operated by users are all aimed at the virtual file directory, and the virtual file system will handle the real file operations.

The process of establishing a relationship between a real file system and a virtual file system on a U disk is called mounting.

Back in the browser, the process of establishing a relationship between a virtual dom and a real dom can also be called a mount. Because the connection between "virtual" and "real" is established, the user operates the "virtual" part.

So what does the mount mentioned in vue mean?

The process of letting the Vue instance control an area of the page is called mounting.

Mounting method:

1. Configure via `el: "css selector"

New Vue ({el:'# app'})

The Vue is mounted when it is created.

2. Configure through Vue instance. $mount ("css selector")

New Vue ({...}) Vue.$mount ("# app")

Mount the Vue after it has been created

The purpose of $is to distinguish that the data names in the Vue instance are the same (to prevent duplicate names)

The above is all the content of this article "what does mounting in vuejs mean?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report