开发中只适用于调试! 不要用于线上环境,否则会有问题! 解决方案: 方案1. const instance = getCurrentInstance() console.log(instance.appContext.config.globalProperties) 获取挂载到全局中的方法 方案2. const { proxy } = getCurrentInstance() 使用proxy线上也不会出现问题