vue computed和 watch的区别

watch:不支持缓存,数据变时会触发,支持异步

computed:支持缓存,只有依赖的数据发生改变,才会重新计算,不支持异步

posted @ 2021-04-12 21:20    阅读(61)  评论(0)    收藏  举报