Browse Source

Pull request #3472: KERNEL-14316 fix: 全局打包下的一些补充 & 同步代码

Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6

* commit 'ccc155565883d351d01da07ca18ec4a71eea199b':
  KERNEL-14316 chore: 代码同步一下
  KERNEL-14316 fix: 全局打包下的一些补充
es6
treecat-罗群 2 years ago
parent
commit
1b3fc0940c
  1. 1
      packages/fineui/src/base/tree/customtree.js
  2. 7
      packages/fineui/src/bundle.js
  3. 1
      packages/fineui/src/case/button/item.singleselect.radio.js
  4. 1
      packages/fineui/src/component/allvaluechooser/combo.allvaluechooser.js
  5. 12
      packages/fineui/src/core/structure/tree.js
  6. 10
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

1
packages/fineui/src/base/tree/customtree.js

@ -81,6 +81,7 @@ export class CustomTree extends Widget {
{
id: node.id,
pId: node.pId,
key: node.key,
}
);
let el = stripEL(node);

7
packages/fineui/src/bundle.js

@ -1,15 +1,16 @@
import * as fuiExport from "./index";
import { shortcut, provider } from "@/core/5.inject";
import * as injectFn from "@/core/5.inject";
import { _global } from "@/core/0.foundation";
import * as Decorators from "@/core/decorator";
_global.BI = _global.BI || {};
_global.BI.Decorators = Decorators;
_global.BI.Decorators = { ...Decorators, Model: fuiExport.Fix.Model };
Object.assign(_global, {
Fix: fuiExport.Fix,
_: fuiExport._,
$: fuiExport.$,
jQuery: fuiExport.$,
});
Object.assign(_global.BI, fuiExport, { shortcut, provider });
Object.assign(_global.BI, fuiExport, injectFn);

1
packages/fineui/src/case/button/item.singleselect.radio.js

@ -35,6 +35,7 @@ export class SingleSelectRadioItem extends BasicButton {
items: [
{
type: Radio.xtype,
once: o.once,
ref: _ref => {
this.radio = _ref;
},

1
packages/fineui/src/component/allvaluechooser/combo.allvaluechooser.js

@ -34,6 +34,7 @@ export class AllValueChooserCombo extends AbstractAllValueChooser {
valueFormatter: bind(this._valueFormatter, this),
width: o.width,
height: o.height,
defaultText: o.defaultText,
value: this._assertValue({
type: Selection.Multi,
value: o.value || [],

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

@ -170,15 +170,15 @@ export class Tree {
initTree(nodes) {
this.clear();
const queue = [];
const queue = new Set();
each(nodes, (i, node) => {
const n = new Node(node);
n.set("data", node);
this.addNode(n);
queue.push(n);
queue.add(n);
});
while (!isEmpty(queue)) {
const parent = queue.shift();
queue.forEach(parent => {
queue.delete(parent);
const node = parent.get("data");
each(node.children, (i, child) => {
const n = new Node(child);
@ -186,7 +186,7 @@ export class Tree {
queue.push(n);
this.addNode(parent, n);
});
}
})
}
_toJSON(node) {
@ -265,7 +265,7 @@ export class Tree {
continue;
}
if (temp != null) {
queue = queue.concat(temp.getChildren());
queue.push(...temp.getChildren());
}
}
}

10
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -28,12 +28,12 @@ export class DynamicDateTimeSelect extends Widget {
props () {
return {
baseCls: "bi-date-time-select",
height: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
editorHeight: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
};
}
render() {
const { height } = this.options;
const { editorHeight } = this.options;
return {
type: CenterAdaptLayout.xtype,
@ -79,7 +79,7 @@ export class DynamicDateTimeSelect extends Widget {
}
],
width: 60,
height,
height: editorHeight,
},
},
{
@ -124,7 +124,7 @@ export class DynamicDateTimeSelect extends Widget {
}
],
width: 60,
height,
height: editorHeight,
},
{
type: Label.xtype,
@ -158,7 +158,7 @@ export class DynamicDateTimeSelect extends Widget {
}
],
width: 60,
height,
height: editorHeight,
}
],
}

Loading…
Cancel
Save