Browse Source

chore: 优化下写法,react中children是关键字

es6
guy 3 years ago
parent
commit
057b729187
  1. 6
      src/base/combination/group.combo.js
  2. 1
      src/widget/downlist/popup.downlist.js
  3. 1
      src/widget/multilayerdownlist/popup.downlist.js

6
src/base/combination/group.combo.js

@ -16,7 +16,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
isNeedAdjustWidth: false,
el: {type: "bi.text_button", text: "", value: ""},
children: [],
items: [],
popup: {
el: {
@ -36,7 +36,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
_populate: function (item) {
var self = this, o = this.options;
var children = o.children;
var children = o.items;
if (BI.isEmpty(children)) {
throw new Error("ComboGroup构造错误");
}
@ -45,7 +45,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
ch = BI.formatEL(ch).el;
if (!BI.isEmpty(son)) {
ch.el = BI.clone(ch);
ch.children = son;
ch.items = son;
ch.type = "bi.combo_group";
ch.action = o.action;
ch.height = o.height;

1
src/widget/downlist/popup.downlist.js

@ -114,6 +114,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
maxHeight: 378
};
item.el.childValues = [];
item.items = item.children;
BI.each(item.children, function (i, child) {
var fatherValue = BI.deepClone(item.el.value);
var childValue = BI.deepClone(child.value);

1
src/widget/multilayerdownlist/popup.downlist.js

@ -155,6 +155,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
_createChildren: function (item) {
var self = this;
this._formatEL(item).el.childValues = [];
item.items = item.children;
BI.each(item.children, function (i, child) {
child = child.el ? BI.extend(child.el, {children: child.children}) : child;
var fatherValue = BI.deepClone(self._formatEL(item).el.value);

Loading…
Cancel
Save