In the process of using vue3, there are scenarios where two-dimensional arrays are used. When operating on the internal array, the responsive value has changed, but the view has not been modified. Currently, forced refresh is used to solve this problem. The code is as follows
import {
defineComponent , ref , computed , toRefs , getCurrentInstance} from 'vue'
setup(){
const internalInstance = getCurrentInstance()
//操作数据后更新视图
internalInstance.ctx.$forceUpdate()
return {
internalInstance
}
}
```