公告板
版本库
filestore
活动
搜索
登录
main
/
ZPSZ-BASE
springboot2+avue
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
新增日志
wujianwei
2025-12-23
659c0977f53b02a75b032c4d42aeb466614b8ecd
[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}
}