From 712379e60e6a4cf5d04b6d53dad52ce9f6226d76 Mon Sep 17 00:00:00 2001 From: zengqingzhuang Date: Fri, 29 May 2020 15:32:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B3=A8=E5=86=8Csto?= =?UTF-8?q?re=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.tsx | 2 ++ src/store/index.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 921aa3cea..033e48092 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 962e6d0f7..957e2d2e5 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); +};