vue

vue中watch和computed区别

清风
226
2021-03-15 15:02:39
栏目: 编程语言

vue中watch和computed区别

vue中watch和computed区别有:

1.watch不支持缓存,而computed支持缓存。

2.watch支持异步,而computed不支持异步。

3.watch属于侦听属性,而computed则属于计算属性。

4.处理的数据关系场景不同,watch擅长处理的场景是一个数据影响多个数据,而computed则是一个数据受多个数据影响。

0
看了该问题的人还看了