公告板
版本库
filestore
活动
搜索
登录
main
/
ZPSZ-BASE
springboot2+avue
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
修改
wujianwei
2025-08-15
69f6a5c54eb608fb93d3a8638d4553ebed00f61d
[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}
}