/ 前端 / Vue / computed 计算属性有缓存,多次调用如果依赖值没有更新的话会调缓存。例如多次获取当前时间就不工作 方法不会,只会计算。 适合没有依赖值的, In comparison, a method invocation will always run the function whenever a re-render happens.
评论区