公告板
版本库
filestore
活动
搜索
登录
main
/
ZPSZ-BASE
springboot2+avue
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
修改ID,修改加密方式
15815213711
2025-07-29
4c82fc90c9942245f1bd787d820d3738f1a6bc89
[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}
}