From a7ebd6ec1b2a8c53f3b85aa8f183cfc5fc154139 Mon Sep 17 00:00:00 2001 From: Treecat Date: Fri, 27 Oct 2023 11:32:26 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-15856=20fix:=E5=85=BC=E5=AE=B9=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/constant/writable.var.js | 10 ++++++++++ packages/fineui/src/core/utils/index.js | 6 +++++- packages/fineui/src/without_Jquery_Polyfill.js | 14 -------------- packages/fineui/webpack/attachments.js | 3 +-- 4 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 packages/fineui/src/without_Jquery_Polyfill.js diff --git a/packages/fineui/src/core/constant/writable.var.js b/packages/fineui/src/core/constant/writable.var.js index 45e048502..4d4f90484 100644 --- a/packages/fineui/src/core/constant/writable.var.js +++ b/packages/fineui/src/core/constant/writable.var.js @@ -4,6 +4,7 @@ import { isNumber } from "../2.base"; import { _global } from "../0.foundation"; import { Cache } from "../structure"; +import { setDom, DOM } from "../utils"; const PropertyDescriptors = {}; @@ -145,6 +146,15 @@ PropertyDescriptors["EVENT_BLUR"] = { set: setEventBlur, }; +PropertyDescriptors["DOM"] = { + enumerable: true, + configurable: true, + get: function() { + return DOM; + }, + set: setDom, +}; + export function _defineVarProperties(libName) { Object.defineProperties(libName, PropertyDescriptors); } diff --git a/packages/fineui/src/core/utils/index.js b/packages/fineui/src/core/utils/index.js index d01e65bbc..0c7c22f22 100644 --- a/packages/fineui/src/core/utils/index.js +++ b/packages/fineui/src/core/utils/index.js @@ -6,7 +6,11 @@ import * as platformDom from "./dom"; import * as colorDom from "./color"; -export const DOM = { +export let DOM = { ...platformDom, ...colorDom, }; + +export function setDom(dom) { + DOM = dom; +} diff --git a/packages/fineui/src/without_Jquery_Polyfill.js b/packages/fineui/src/without_Jquery_Polyfill.js deleted file mode 100644 index 369bc3a7f..000000000 --- a/packages/fineui/src/without_Jquery_Polyfill.js +++ /dev/null @@ -1,14 +0,0 @@ -export * from './worker.js'; - -// "!src/base/single/input/file.js", -// "!src/case/ztree/**/*.js", -import * as _case from './case'; -import * as _widget from './widget'; -import { _global } from "@/core/0.foundation"; - -const fuiExport = { - ..._case, - ..._widget -}; - -Object.assign(_global.BI, fuiExport); diff --git a/packages/fineui/webpack/attachments.js b/packages/fineui/webpack/attachments.js index afe2b8a04..882ada3b9 100644 --- a/packages/fineui/webpack/attachments.js +++ b/packages/fineui/webpack/attachments.js @@ -19,8 +19,7 @@ const basicAttachmentMap = { "src/less/component/**/*.less" ]), js_bundle: sync(["src/bundle.js"]), - js_worker: sync(["src/worker.js"]), - js_without_Jquery_polyfill: sync(["src/without_Jquery_Polyfill.js"]), + js_worker: sync(["src/worker.js"]) }; const bundleCss = uniq([].concat(basicAttachmentMap.less, basicAttachmentMap.ui, sync(["public/less/app.less", "public/less/**/*.less"])));