Vue3中使用const {proxy} = getCurrentInstance()代理标错Uncaught (in promise) TypeError: 'set' on proxy: trap returned falsish for property 修改导入方式 // 方式二,此方法在开发环境以及生产环境下都能放到组件上下文对象(推荐)const{proxy} =g
在Vue 3中,getCurrentInstance 是一个用于获取当前组件实例内部信息的函数,但你在使用 const { proxy } = getcurrentinstance() 时遇到了报错。基于你提供的信息和提示,我将从以下几个方面进行解答: 函数名大小写问题: Vue 3中的正确函数名是 getCurrentInstance,而不是 getcurrentinstance。JavaScript是大小写敏感的,...