diff --git a/src/index.tsx b/src/index.tsx index 921aa3ce..033e4809 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -26,6 +26,7 @@ import * as utils from './utils/helper'; import {resizeSensor} from './utils/resize-sensor'; import {setIconVendor} from './renderers/Form/IconPickerIcons'; import {Icon, registerIcon} from './components/icons'; +import {RegisterStore} from './store'; // 注册渲染器 import './renderers/Action'; @@ -167,6 +168,7 @@ export { render, clearStoresCache, Renderer, + RegisterStore, FormItem, OptionsControl, wrapFetcher, diff --git a/src/store/index.ts b/src/store/index.ts index 962e6d0f..957e2d2e 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -85,3 +85,6 @@ export const RendererStore = types export type IRendererStore = typeof RendererStore.Type; export {iRendererStore, IIRendererStore}; +export const RegisterStore = function (store: any) { + allowedStoreList.push(store as any); +};