feat: add usePublicApi
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { getCurrentInstance } from 'vue';
|
||||
|
||||
// expose public api
|
||||
export function usePublicApi(apis: Record<string, any>) {
|
||||
const vm = (getCurrentInstance() as any).ctx;
|
||||
Object.assign(vm, apis);
|
||||
}
|
||||
Reference in New Issue
Block a user