1.reactive声明变量的二次赋值(解决页面数据响应问题)
vue3由reactive声明的变量,例如:
let county = reactive([])
county = obj 这样的赋值方式在vue2可以,vue3是不适应的,解决方法:
Object.assign(objName, obj)
2.vue3数组置空
county.length = 0
vue3由reactive声明的变量,例如:
let county = reactive([])
county = obj 这样的赋值方式在vue2可以,vue3是不适应的,解决方法:
Object.assign(objName, obj)
county.length = 0