公告板
版本库
filestore
活动
搜索
登录
main
/
ZPSZ-BASE
springboot2+avue
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
新增前后端
wujianwei
2025-09-09
deb890911f16f28d0caf0edd7b96e8082bdd306d
[ZPSZ-BASE.git]
/
ui
/
admin-ui3
/
src
/
utils
/
useCurrentInstance.ts
1
2
3
4
5
6
7
8
9
10
import {ComponentInternalInstance, getCurrentInstance} from "vue";
/**
* ts 全局挂在会报错,只能先转一下
*/
export default function useCurrentInstance() {
const {appContext} = getCurrentInstance() as ComponentInternalInstance
const proxy = appContext.config.globalProperties;
return {proxy}
}