Note that vue3.0 cannot directly assign reactive

//错误
//赋值之后失去响应式
const tenantContract = reactive<any>([])
tenantContract = [1,2,3]

//正确   或者使用ref定义
const data = reactive<any>({
    
    
		tenantContract: []
})
data.tenantContract = [1,2,3]

As for the reason, this article is well written link

Guess you like

Origin blog.csdn.net/weixin_45028704/article/details/128235683