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
computed,是计算属性,具有缓存性(惰性求值观察者),只有响应式依赖发生改变,才会重新计算。
computed
methods,每次调用都会执行函数。
methods
watch,是侦听属性,监听到数据变化就会执行回调,在回调可以进行一些逻辑操作。
watch
从使用场景上来说,computed适用:一个数据被多个数据影响;而watch适用:一个数据影响多个数据。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
computed
,是计算属性,具有缓存性(惰性求值观察者),只有响应式依赖发生改变,才会重新计算。methods
,每次调用都会执行函数。watch
,是侦听属性,监听到数据变化就会执行回调,在回调可以进行一些逻辑操作。总结
从使用场景上来说,computed适用:一个数据被多个数据影响;而watch适用:一个数据影响多个数据。
The text was updated successfully, but these errors were encountered: