When using vuex, it is found that when you get the variable of type string number of state, you can get the value directly through store.state.value, but when you get the object, the console prints the Proxy object, which is inside the Proxy object. [[Target]] is the real object.
//第一种获取target值的方式,通过vue中的响应式对象可使用toRaw()方法获取原始对象
import { toRaw } from '@vue/reactivity'
var list = toRaw(store.state.menuList)
//第二种获取target值的方式,通过json序列化之后可获取值
JSON.parse(JSON.stringify(store.getters.menuList))
Update: I recently encountered a small problem when using toRaw. Using this method will cause the data to be updated but the view will not be updated. Although the proxy object is taken out from vue, it can also directly perform array operations, such as splice. , array expansion, etc.