Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~windy/fui

es6
windy 4 years ago
parent
commit
f423701923
  1. 2
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 47
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 2
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 2
      dist/2.0/fineui_without_normalize.css
  10. 2
      dist/2.0/fineui_without_normalize.min.css
  11. 2
      dist/core.css
  12. 47
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 47
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 2
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 47
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 2
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 47
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 2
      dist/font.css
  28. 2
      dist/resource.css
  29. 2
      dist/utils.js
  30. 2
      dist/utils.min.js
  31. 2
      package.json
  32. 8
      src/case/button/item.multiselect.js
  33. 10
      src/case/button/item.singleselect.radio.js
  34. 26
      src/core/wrapper/layout.js

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

47
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-9 16:00:44 */
/*! time: 2021-3-9 19:40:47 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -15020,13 +15020,12 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
}
});
if (hasChild === true) {
this.appendFragment(frag);
}
@ -15218,13 +15217,19 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item));
return child.shouldUpdate(this._getOptions(item)) === true;
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -15311,14 +15316,7 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
return this.updateItemAt(index, vnode);
}
},
@ -32928,7 +32926,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 26
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -32944,8 +32944,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -32992,6 +32992,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);
/***/ }),
/* 470 */
/***/ (function(module, exports) {
@ -33128,7 +33129,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
height: 24
height: 24,
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -33144,7 +33148,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -33157,7 +33162,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
width: o.conWrapperWidth
}, this.text)
}))));
},

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

47
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-9 16:00:44 */
/*! time: 2021-3-9 19:40:47 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -15020,13 +15020,12 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
}
});
if (hasChild === true) {
this.appendFragment(frag);
}
@ -15218,13 +15217,19 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item));
return child.shouldUpdate(this._getOptions(item)) === true;
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -15311,14 +15316,7 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
return this.updateItemAt(index, vnode);
}
},
@ -32928,7 +32926,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 26
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -32944,8 +32944,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -32992,6 +32992,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);
/***/ }),
/* 470 */
/***/ (function(module, exports) {
@ -33128,7 +33129,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
height: 24
height: 24,
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -33144,7 +33148,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -33157,7 +33162,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
width: o.conWrapperWidth
}, this.text)
}))));
},

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

47
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-9 16:00:44 */
/*! time: 2021-3-9 19:40:47 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -15020,13 +15020,12 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
}
});
if (hasChild === true) {
this.appendFragment(frag);
}
@ -15218,13 +15217,19 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item));
return child.shouldUpdate(this._getOptions(item)) === true;
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -15311,14 +15316,7 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
return this.updateItemAt(index, vnode);
}
},
@ -32928,7 +32926,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 26
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -32944,8 +32944,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -32992,6 +32992,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);
/***/ }),
/* 470 */
/***/ (function(module, exports) {
@ -33128,7 +33129,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
height: 24
height: 24,
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -33144,7 +33148,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -33157,7 +33162,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
width: o.conWrapperWidth
}, this.text)
}))));
},

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

47
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-9 16:00:44 */
/*! time: 2021-3-9 19:40:47 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -15020,13 +15020,12 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
}
});
if (hasChild === true) {
this.appendFragment(frag);
}
@ -15218,13 +15217,19 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item));
return child.shouldUpdate(this._getOptions(item)) === true;
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -15311,14 +15316,7 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
return this.updateItemAt(index, vnode);
}
},
@ -32928,7 +32926,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 26
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -32944,8 +32944,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -32992,6 +32992,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);
/***/ }),
/* 470 */
/***/ (function(module, exports) {
@ -33128,7 +33129,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
height: 24
height: 24,
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -33144,7 +33148,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -33157,7 +33162,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
width: o.conWrapperWidth
}, this.text)
}))));
},

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

47
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-9 16:00:44 */
/*! time: 2021-3-9 19:40:47 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -11042,13 +11042,12 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
}
});
if (hasChild === true) {
this.appendFragment(frag);
}
@ -11240,13 +11239,19 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item));
return child.shouldUpdate(this._getOptions(item)) === true;
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -11333,14 +11338,7 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
return this.updateItemAt(index, vnode);
}
},
@ -28950,7 +28948,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 26
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -28966,8 +28966,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -29014,6 +29014,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
BI.MultiSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_item", BI.MultiSelectItem);
/***/ }),
/* 470 */
/***/ (function(module, exports) {
@ -29150,7 +29151,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
height: 24
height: 24,
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -29166,7 +29170,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -29179,7 +29184,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
width: o.conWrapperWidth
}, this.text)
}))));
},

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

2
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-9 16:00:44 */
/*! time: 2021-3-9 19:40:47 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20210309160246",
"version": "2.0.20210309194230",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

8
src/case/button/item.multiselect.js

@ -11,7 +11,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 26
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -27,8 +29,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,

10
src/case/button/item.singleselect.radio.js

@ -10,7 +10,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
height: 24
height: 24,
iconWrapperWidth: 16,
textHgap: 0,
textRgap: 0
});
},
_init: function () {
@ -26,7 +29,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
hgap: o.textHgap,
rgap: o.textHgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -39,7 +43,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
width: o.conWrapperWidth
}, this.text)
}))));
},

26
src/core/wrapper/layout.js

@ -71,13 +71,12 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
}
});
if (hasChild === true) {
this.appendFragment(frag);
}
@ -269,13 +268,19 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item));
return child.shouldUpdate(this._getOptions(item)) === true;
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -362,14 +367,7 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
return this.updateItemAt(index, vnode);
}
},

Loading…
Cancel
Save