Browse Source

Pull request #2472: 无JIRA任务 node家族

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '5f9214c9ad9072c003c1de742f0b07d14e4be8a6':
  node家族
es6
guy 3 years ago
parent
commit
697897441b
  1. 76
      src/base/single/button/node/icontexticonnode.js
  2. 54
      src/base/single/button/node/icontextnode.js
  3. 54
      src/base/single/button/node/texticonnode.js

76
src/base/single/button/node/icontexticonnode.js

@ -25,55 +25,41 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
var blank = BI.createWidget({
type: "bi.layout",
width: o.height,
height: o.height
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: { type: "bi.icon_label",
type: "bi.icon_label", cls: o.iconCls1,
cls: o.iconCls2, width: o.leftIconWrapperWidth || o.height,
width: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
}, },
top: 0, textAlign: "left",
bottom: 0, hgap: o.textHgap,
right: 0 vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}] }]
}); };
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank)
}))));
}, },
doClick: function () { doClick: function () {

54
src/base/single/button/node/icontextnode.js

@ -24,33 +24,35 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) items: [{
})))); type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

54
src/base/single/button/node/texticonnode.js

@ -23,33 +23,35 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: ["fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) items: [{
})))); type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

Loading…
Cancel
Save