From 2ead0ec7005e51eb5a9c30d1d22576f421243f3e Mon Sep 17 00:00:00 2001 From: dailer Date: Thu, 20 Jul 2023 16:33:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=20=20report=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84worker=E9=80=82=E9=85=8D+=E5=88=A0=E5=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/worker.js | 36 ++++++++++++++++++++++++++ packages/fineui/webpack/attachments.js | 6 ++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 packages/fineui/src/worker.js diff --git a/packages/fineui/src/worker.js b/packages/fineui/src/worker.js new file mode 100644 index 000000000..2956dde18 --- /dev/null +++ b/packages/fineui/src/worker.js @@ -0,0 +1,36 @@ +// sideEffects +import "./core/system"; + +import * as _core from "./core"; +import * as _base from "./base"; +import * as _fix from "./fix"; +import * as _router from "./router"; + +export * as Popper from "@popperjs/core"; + +import * as D from "@/core/decorator"; +import { Fix } from "./fix"; + +const Decorators = { ...D, Model: Fix.Model }; + +const fuiExport = { + ..._core, + ..._base, + ..._fix, + ..._router +}; + +import * as injectFn from "@/core/5.inject"; +import { _global } from "@/core/0.foundation"; +import { _defineVarProperties } from "@/core/constant/writable.var"; + +_global.BI = _global.BI || {}; + +Object.assign(_global, { + Fix: fuiExport.Fix, + _: fuiExport._, +}); + +Object.assign(_global.BI, fuiExport, injectFn, { Decorators, }); + +_defineVarProperties(_global.BI); diff --git a/packages/fineui/webpack/attachments.js b/packages/fineui/webpack/attachments.js index be1d89017..3adb47d20 100644 --- a/packages/fineui/webpack/attachments.js +++ b/packages/fineui/webpack/attachments.js @@ -19,7 +19,8 @@ const basicAttachmentMap = { "src/less/widget/**/*.less", "src/less/component/**/*.less" ]), - js_bundle: sync(["src/bundle.js"]) + js_bundle: sync(["src/bundle.js"]), + js_worker: sync(["src/worker.js"]) }; const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"])); @@ -34,8 +35,7 @@ const fineui = [].concat( ); const fineuiForWorker = [].concat( - jqueryPolyfill, - basicAttachmentMap.js_bundle, + basicAttachmentMap.js_worker, basicAttachmentMap.ui, basicAttachmentMap.ts ); From 961691646377209febc02e023fc465a00d97f8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dailer-=E5=88=98=E8=8D=A3=E6=AD=86?= Date: Tue, 25 Jul 2023 14:07:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=BC=E5=87=BA=20bi.context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/fineui/src/base/index.js b/packages/fineui/src/base/index.js index e5c6dcdb5..da9f8a0c0 100644 --- a/packages/fineui/src/base/index.js +++ b/packages/fineui/src/base/index.js @@ -11,3 +11,4 @@ export * from "./layer"; export * from "./list"; export * from "./single"; export * from "./el"; +export * from "./context"; \ No newline at end of file