公告板
版本库
filestore
活动
搜索
登录
main
/
onbus_crm
CRM系统前端
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
feat: add useDesign
vben
2020-12-07
74e62cbc712bdd4d4826e5fe80f537d87e44ffce
[onbus_crm.git]
/
src
/
hooks
/
core
/
useExpose.ts
1
2
3
4
5
6
7
8
9
import { getCurrentInstance } from 'vue';
// expose public api
export function useExpose(apis: Record<string, any>) {
const instance = getCurrentInstance();
if (instance) {
Object.assign(instance.proxy, apis);
}
}