第一种:通过vue中的响应式对象可使用toRaw()方法获取原始对象
import { toRaw } from 'vue'
const trueUserList=toRaw(userList)
第二种:通过json序列化
JSON.parse(JSON.stringify(userList))
特别注意:vue3使用proxy,对于对象和数组都不能直接整个赋值
第一种:通过vue中的响应式对象可使用toRaw()方法获取原始对象
import { toRaw } from 'vue'
const trueUserList=toRaw(userList)
第二种:通过json序列化
JSON.parse(JSON.stringify(userList))
特别注意:vue3使用proxy,对于对象和数组都不能直接整个赋值