Browse Source

KERNEL-14316 chore: 代码同步一下

es6
Treecat 1 year ago
parent
commit
441a8b8820
  1. 1
      packages/fineui/src/base/tree/customtree.js
  2. 1
      packages/fineui/src/case/button/item.singleselect.radio.js
  3. 1
      packages/fineui/src/component/allvaluechooser/combo.allvaluechooser.js
  4. 12
      packages/fineui/src/core/structure/tree.js
  5. 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, id: node.id,
pId: node.pId, pId: node.pId,
key: node.key,
} }
); );
let el = stripEL(node); let el = stripEL(node);

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

@ -35,6 +35,7 @@ export class SingleSelectRadioItem extends BasicButton {
items: [ items: [
{ {
type: Radio.xtype, type: Radio.xtype,
once: o.once,
ref: _ref => { ref: _ref => {
this.radio = _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), valueFormatter: bind(this._valueFormatter, this),
width: o.width, width: o.width,
height: o.height, height: o.height,
defaultText: o.defaultText,
value: this._assertValue({ value: this._assertValue({
type: Selection.Multi, type: Selection.Multi,
value: o.value || [], value: o.value || [],

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

@ -170,15 +170,15 @@ export class Tree {
initTree(nodes) { initTree(nodes) {
this.clear(); this.clear();
const queue = []; const queue = new Set();
each(nodes, (i, node) => { each(nodes, (i, node) => {
const n = new Node(node); const n = new Node(node);
n.set("data", node); n.set("data", node);
this.addNode(n); this.addNode(n);
queue.push(n); queue.add(n);
}); });
while (!isEmpty(queue)) { queue.forEach(parent => {
const parent = queue.shift(); queue.delete(parent);
const node = parent.get("data"); const node = parent.get("data");
each(node.children, (i, child) => { each(node.children, (i, child) => {
const n = new Node(child); const n = new Node(child);
@ -186,7 +186,7 @@ export class Tree {
queue.push(n); queue.push(n);
this.addNode(parent, n); this.addNode(parent, n);
}); });
} })
} }
_toJSON(node) { _toJSON(node) {
@ -265,7 +265,7 @@ export class Tree {
continue; continue;
} }
if (temp != null) { 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 () { props () {
return { return {
baseCls: "bi-date-time-select", baseCls: "bi-date-time-select",
height: SIZE_CONSANTS.LIST_ITEM_HEIGHT, editorHeight: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}; };
} }
render() { render() {
const { height } = this.options; const { editorHeight } = this.options;
return { return {
type: CenterAdaptLayout.xtype, type: CenterAdaptLayout.xtype,
@ -79,7 +79,7 @@ export class DynamicDateTimeSelect extends Widget {
} }
], ],
width: 60, width: 60,
height, height: editorHeight,
}, },
}, },
{ {
@ -124,7 +124,7 @@ export class DynamicDateTimeSelect extends Widget {
} }
], ],
width: 60, width: 60,
height, height: editorHeight,
}, },
{ {
type: Label.xtype, type: Label.xtype,
@ -158,7 +158,7 @@ export class DynamicDateTimeSelect extends Widget {
} }
], ],
width: 60, width: 60,
height, height: editorHeight,
} }
], ],
} }

Loading…
Cancel
Save