10 lines
225 B
TypeScript
10 lines
225 B
TypeScript
|
|
import { getCurrentInstance } from 'vue';
|
||
|
|
|
||
|
|
// expose public api
|
||
|
|
export function useExpose(apis: Record<string, any>) {
|
||
|
|
const instance = getCurrentInstance();
|
||
|
|
if (instance) {
|
||
|
|
Object.assign(instance.proxy, apis);
|
||
|
|
}
|
||
|
|
}
|