Browse Source

KERNEL-14316 fix: 修复一些细节问题

es6
Treecat 1 year ago
parent
commit
ad0730a254
  1. 2
      packages/fineui/src/core/2.base.js
  2. 4
      packages/fineui/src/core/5.inject.js
  3. 9
      packages/fineui/src/core/decorator.js
  4. 2
      packages/fineui/src/core/structure/tree.js
  5. 2
      packages/fineui/src/index.js

2
packages/fineui/src/core/2.base.js

@ -618,7 +618,7 @@ export function uniq(array, isSorted, iteratee, context) {
} }
iteratee && (iteratee = traverse(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);
} }
// 对象相关方法 // 对象相关方法

4
packages/fineui/src/core/5.inject.js

@ -474,13 +474,13 @@ export function createWidget(item, options, context, lazy) {
if (!w.listeners || isArray(w.listeners)) { if (!w.listeners || isArray(w.listeners)) {
w.listeners = (w.listeners || []).concat([{ w.listeners = (w.listeners || []).concat([{
eventName: Events.MOUNT, eventName: Events.MOUNT,
action: () => { action: function () {
Plugin.getObject(elType, this); Plugin.getObject(elType, this);
}, },
}]); }]);
} else { } else {
w.listeners[Events.MOUNT] = [ w.listeners[Events.MOUNT] = [
() => { function() {
Plugin.getObject(elType, this); Plugin.getObject(elType, this);
} }
].concat(w.listeners[Events.MOUNT] || []); ].concat(w.listeners[Events.MOUNT] || []);

9
packages/fineui/src/core/decorator.js

@ -1,11 +1,6 @@
// export * from "../../typescript/core/decorator/decorator.ts"; // export * from "../../typescript/core/decorator/decorator.ts";
import { import { shortcut as biShortcut, provider as biProvider, model as biModel, Models } from "./5.inject";
shortcut as biShortcut,
provider as biProvider,
model as biModel,
Models
} from "./5.inject";
/** /**
* 注册widget * 注册widget
@ -39,7 +34,7 @@ export function model() {
* @param Model model类 * @param Model model类
* @param opts 额外条件 * @param opts 额外条件
*/ */
export function store(Model, opts) { export function store(Model, opts = {}) {
return function classDecorator(constructor) { return function classDecorator(constructor) {
return class extends constructor { return class extends constructor {
_store() { _store() {

2
packages/fineui/src/core/structure/tree.js

@ -183,7 +183,7 @@ export class Tree {
each(node.children, (i, child) => { each(node.children, (i, child) => {
const n = new Node(child); const n = new Node(child);
n.set("data", child); n.set("data", child);
queue.push(n); queue.add(n);
this.addNode(parent, n); this.addNode(parent, n);
}); });
}) })

2
packages/fineui/src/index.js

@ -16,6 +16,6 @@ export * from "./widget";
export * from "./component"; export * from "./component";
export * from "./fix"; export * from "./fix";
export * from "./router"; export * from "./router";
export * as Popper from "@popperjs/core";
export const jQuery = _jquery; export const jQuery = _jquery;
export const $ = _jquery; export const $ = _jquery;

Loading…
Cancel
Save