Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第60题:谈谈你对MVVM模式的理解? #60

Open
noxussj opened this issue Jun 18, 2020 · 0 comments
Open

第60题:谈谈你对MVVM模式的理解? #60

noxussj opened this issue Jun 18, 2020 · 0 comments
Labels

Comments

@noxussj
Copy link
Owner

noxussj commented Jun 18, 2020

什么是MVVM?

MVVM分为Model、View、ViewModel三者

  • Model:代表数据模型,数据和业务逻辑都在Model层中定义
  • View:代表UI视图,负责数据的展示
  • ViewModel:负责监听Model中数据的改变并且控制视图的更新

总结:MVVM模式简化了界面与业务的依赖,解决了数据频繁更新。MVVM 在使用当中,利用双向绑定技术,使得 Model 变化时,ViewModel 会自动更新,而 ViewModel 变化时,View 也会自动变化

@noxussj noxussj added the Vue label Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant