@antdv/pro-utils
Version:
@antdv/pro-utils
17 lines (16 loc) • 405 B
JavaScript
import { inject, provide, ref } from "vue";
const ProFormContextKey = Symbol("ProFormContextProps");
function useProvideProFormContext(props) {
provide(ProFormContextKey, props);
}
function useInjectProFormContext() {
return inject(ProFormContextKey, {
formRef: ref(void 0),
formModel: ref({}),
formMethods: void 0
});
}
export {
useInjectProFormContext,
useProvideProFormContext
};