Getting started with VUE (MVVM model) (5)

MVVM model

Official website introduction:

insert image description here

MVVM

1. M: Model (Model) : corresponds to the data in data
2. V: View (View) : Template DOM (page)
3. VM: View Model : Vue instance object

DOM Listeners: Listen to
Data Bindings: Data Binding
insert image description here
insert image description here

Observe the vue instance:

insert image description here
insert image description here
Summary : The data written in data finally appears on the vue instance

What can be written in { {}}

1. Attributes defined in data
2. Expressions
3. Almighty on the vm instance
4. Can also be used on the Vue prototype
Example:
insert image description here

insert image description here
insert image description here

understand

It is not in the data, so it can be seen, but the data in the data finally appears on the vm, and all the vm can be used directly in the template

Guess you like

Origin blog.csdn.net/qq_43010602/article/details/122128792