From 8fcb09c1e3c2805906ed44cd4cda7426d3a2a65b Mon Sep 17 00:00:00 2001 From: "Zhenfei.Li" Date: Fri, 6 Jan 2023 11:31:15 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14035=20refactor:=20=E6=8C=82=E8=BD=BDEl?= =?UTF-8?q?ement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/element/index.js | 5 +++-- src/core/index.js | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/element/index.js b/src/core/element/index.js index 070afb0f3..da27b0719 100644 --- a/src/core/element/index.js +++ b/src/core/element/index.js @@ -1,8 +1,7 @@ import { Element } from "./element"; import { isString, isWidget } from "../2.base"; -BI.Element = Element; -BI.Element.renderEngine = { +Element.renderEngine = { createElement: widget => { if (isWidget(widget)) { const o = widget.options; @@ -30,3 +29,5 @@ BI.Element.renderEngine = { return new Element(); }, }; + +export { Element }; diff --git a/src/core/index.js b/src/core/index.js index a492a0d96..49d7b2125 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -14,6 +14,7 @@ import { ShowListener } from "./listener/listener.show"; import { useInWorker } from "./worker"; import * as constant from "./constant"; import * as logic from "./logic"; +import { Element } from "./element"; export * from "./decorator"; export * from "./2.base"; @@ -33,7 +34,8 @@ export { StyleLoaderManager, ShowListener, Plugin, - useInWorker + useInWorker, + Element }; Object.assign(BI, { @@ -47,6 +49,7 @@ Object.assign(BI, { component: inject.shortcut, ...action, ...controllers, + Element, ...func, StyleLoaderManager, ShowListener,