项目中如果对象特别复杂,不需要数据全部是响应式对象,可以使用shallowReactive创建浅层响应对象 1. 引入shallowRecative import {shallowReactive} from "vue"; 2. 使用 export default { data(){ //浅层响应式对象 return shallowReactive({ msg:"今天天气真不错", stu:{ name:"熏悟空", age:18, gender:"男" } }) } }