From ad0730a2541810901c5963e74df09a708fecefc5 Mon Sep 17 00:00:00 2001 From: Treecat Date: Mon, 3 Apr 2023 16:41:49 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14316=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E7=BB=86=E8=8A=82=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/2.base.js | 2 +- packages/fineui/src/core/5.inject.js | 4 ++-- packages/fineui/src/core/decorator.js | 9 ++------- packages/fineui/src/core/structure/tree.js | 2 +- packages/fineui/src/index.js | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/fineui/src/core/2.base.js b/packages/fineui/src/core/2.base.js index 59e1817f1..57d7f657c 100644 --- a/packages/fineui/src/core/2.base.js +++ b/packages/fineui/src/core/2.base.js @@ -618,7 +618,7 @@ export function uniq(array, isSorted, iteratee, context) { } iteratee && (iteratee = traverse(iteratee, context)); - return BI._uniq.call(BI._, array, isSorted, iteratee, context); + return BI._.uniq.call(BI._, array, isSorted, iteratee, context); } // 对象相关方法 diff --git a/packages/fineui/src/core/5.inject.js b/packages/fineui/src/core/5.inject.js index 282ba270c..9c3cb555e 100644 --- a/packages/fineui/src/core/5.inject.js +++ b/packages/fineui/src/core/5.inject.js @@ -474,13 +474,13 @@ export function createWidget(item, options, context, lazy) { if (!w.listeners || isArray(w.listeners)) { w.listeners = (w.listeners || []).concat([{ eventName: Events.MOUNT, - action: () => { + action: function () { Plugin.getObject(elType, this); }, }]); } else { w.listeners[Events.MOUNT] = [ - () => { + function() { Plugin.getObject(elType, this); } ].concat(w.listeners[Events.MOUNT] || []); diff --git a/packages/fineui/src/core/decorator.js b/packages/fineui/src/core/decorator.js index 73dfc469d..31f5920c2 100644 --- a/packages/fineui/src/core/decorator.js +++ b/packages/fineui/src/core/decorator.js @@ -1,11 +1,6 @@ // export * from "../../typescript/core/decorator/decorator.ts"; -import { - shortcut as biShortcut, - provider as biProvider, - model as biModel, - Models -} from "./5.inject"; +import { shortcut as biShortcut, provider as biProvider, model as biModel, Models } from "./5.inject"; /** * 注册widget @@ -39,7 +34,7 @@ export function model() { * @param Model model类 * @param opts 额外条件 */ -export function store(Model, opts) { +export function store(Model, opts = {}) { return function classDecorator(constructor) { return class extends constructor { _store() { diff --git a/packages/fineui/src/core/structure/tree.js b/packages/fineui/src/core/structure/tree.js index 3f640f7c0..ec8db84c9 100644 --- a/packages/fineui/src/core/structure/tree.js +++ b/packages/fineui/src/core/structure/tree.js @@ -183,7 +183,7 @@ export class Tree { each(node.children, (i, child) => { const n = new Node(child); n.set("data", child); - queue.push(n); + queue.add(n); this.addNode(parent, n); }); }) diff --git a/packages/fineui/src/index.js b/packages/fineui/src/index.js index eaae67490..718910771 100644 --- a/packages/fineui/src/index.js +++ b/packages/fineui/src/index.js @@ -16,6 +16,6 @@ export * from "./widget"; export * from "./component"; export * from "./fix"; export * from "./router"; - +export * as Popper from "@popperjs/core"; export const jQuery = _jquery; export const $ = _jquery;