shallowReactive:只处理对象最外层属性的响应式(浅响应式)。 shallowRef:只处理基本数据类型的响应式, 不进行对象的响应式处理。 什么时候使用? 如果有一个对象数据,结构比较深, 但变化时只是外层属性变化 ===> shallowReactive。 如果有一个对象数据,后续功能不会修改该对象中的属性,而是生新的对象来替换 ===> shallowRef。 本栏目推荐文章理解ref和shallowRef的区别Vue3中shallowReactive 与 shallowRef 的用法vue3 - 警告 `shallowRef` instead of `ref` - 解决浅析vue3中如何使用动态组件、如何快速理解Vue3的 toRaw和markRaw、ref与shallowRef、shallowReactive 区别shallowReactive 与 shallowRefVue3 shallowReactive与shallowRefvue3中ref和shallowRef的区别[深入vue3之refs] ref、unref、toRef、toRefs、isRef、customRef、shallowRef、triggerRef等使用与讲解shallowReactive shallowRefshallowreactive shallowref vue3 vue shallowreactive shallowref组件markraw shallowreactive shallowref shallowreactive shallowref shallowref vue3 vue ref shallowref triggerref customref torefs shallowref instead vue3 vue shallowref ref