In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what does vm refer to in vue". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In vue, vm is the abbreviation of ViewModel, the meaning of view model, and the bridge between view and model; ViewModel can monitor changes in data, and then notify the corresponding view to do automatic updates to achieve two-way binding.
This article operating environment: windows10 system, Vue2.9.6 version, DELL G3 computer.
What is vm in vue
VM is actually a ViewModel-- view model.
MVVM View-Model-View Model
[view] refers to the page you see, and [model] refers to the data passed by the back end.
[view model] the core of the mvvm schema, which is the bridge between view and model; it has two directions:
One is to convert [model] into [view], that is, the data passed by the back end is converted into the page you see. This is done by data binding.
The second is to convert [view] into [model], that is, the pages you see are converted into back-end data. This is done by listening for DOM events.
Both of these directions are implemented, which we call [two-way binding] of data.
Under the framework of MVVM, views and models cannot communicate directly. They communicate through ViewModel, and ViewModel usually implements an observer observer. When the data changes, ViewModel can monitor the change of the data, and then notify the corresponding view to do automatic updates.
When the user manipulates the view, ViewModel can also monitor the changes in the view and then notify the data to make changes, which actually realizes the two-way binding of the data. And View and ViewModel in MVVM can communicate with each other.
This is the end of the content of "what does vm in vue refer to". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.