在使用vue3的过程中,有使用到二维数组的场景,在对内部数组进行操作时,响应式的value值已经发生改变,但是视图还未修改,目前使用强制刷新解决该问题了,代码如下
import {
defineComponent , ref , computed , toRefs , getCurrentInstance} from 'vue'
setup(){
const internalInstance = getCurrentInstance()
//操作数据后更新视图
internalInstance.ctx.$forceUpdate()
return {
internalInstance
}
}
```