`
When vue3 uses const { proxy } = getCurrentInstance() to obtain this instance, ctx reports undefined
Solution:
In Vue3, getCurrentInstance represents the context, that is, the current instance. ctx is equivalent to this of Vue2, but when using ctx instead of this, the compilation will report an error. The solution to this problem is to use proxy instead of ctx
// 获取Composition API 上下文对象
// const { ctx} = getCurrentInstance()
调整为
const {
proxy } = getCurrentInstance()