We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To: Vdan123
面试公司: 网易
面试环节: 一面
问题: 请介绍观察者模式
The text was updated successfully, but these errors were encountered:
定义对象间的一种一对多的依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象的状态得到通知并自动更新
1.当一个对象的改变需要同时改变其他对象,而不知道到底有多少对象待改变 2.当一个对象必须通知其他对象,而它又不希望是紧密耦合的
1.目标和观察者之间的松散耦合,目标不需要知道观察者有多少,属于哪个具体的类。同时为了保持系统层次的完整,它们可以属于不同抽象层 2.可以在任意时刻增加和删除观察者
观察者之间并不知道相互的存在。所以如果依赖准则定义不当、目标的操作失误,都会引起一系列依赖的错误更新
Vue.js 的响应式系统:如何做到在 data 发生改变时,视图会自动更新?
模型(Model)通过 Observer、Dep、Watcher、Directive 等一系列对象的关联,和视图(DOM)建立起关系。归纳起来,Vue.js 在这里主要做了三件事:
Sorry, something went wrong.
Vdan123
No branches or pull requests
To:
Vdan123
面试公司:
网易
面试环节:
一面
问题:
请介绍观察者模式
The text was updated successfully, but these errors were encountered: