Browse Source

BI-106880 视觉处理fineui接口提供

es6
windy 2 years ago
parent
commit
876be5f7dc
  1. 4
      src/case/button/node/node.arrow.js
  2. 2
      src/case/button/node/node.icon.arrow.js
  3. 12
      src/case/checkbox/check.arrownode.js
  4. 7
      src/case/layer/panel.js
  5. 26
      src/widget/numberinterval/numberinterval.js

4
src/case/button/node/node.arrow.js

@ -17,7 +17,9 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
render: function () {
var self = this, o = this.options;
this.checkbox = BI.createWidget({
type: "bi.arrow_group_node_checkbox"
type: "bi.arrow_group_node_checkbox",
expandIcon: o.expandIcon,
collapseIcon: o.collapseIcon,
});
return {
type: "bi.vertical_adapt",

2
src/case/button/node/node.icon.arrow.js

@ -29,6 +29,8 @@ BI.IconArrowNode = BI.inherit(BI.NodeButton, {
var self = this, o = this.options;
this.checkbox = BI.createWidget({
type: "bi.arrow_group_node_checkbox",
expandIcon: o.expandIcon,
collapseIcon: o.collapseIcon,
width: 24,
stopPropagation: true
});

12
src/case/checkbox/check.arrownode.js

@ -4,17 +4,21 @@
*/
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-group-node-checkbox expander-right-font"
var conf = BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
extraCls: "bi-arrow-group-node-checkbox " + (conf.collapseIcon || "expander-right-font"),
expandIcon: "expander-down-font",
collapseIcon: "expander-right-font"
});
},
setSelected: function (v) {
var o = this.options;
BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("expander-right-font").addClass("expander-down-font");
this.element.removeClass(o.collapseIcon).addClass(o.expandIcon);
} else {
this.element.removeClass("expander-down-font").addClass("expander-right-font");
this.element.removeClass(o.expandIcon).addClass(o.collapseIcon);
}
}
});

7
src/case/layer/panel.js

@ -8,6 +8,7 @@ BI.Panel = BI.inherit(BI.Widget, {
return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-panel bi-border",
title: "",
titleHeight: 30,
titleButtons: [],
el: {},
logic: {
@ -34,7 +35,7 @@ BI.Panel = BI.inherit(BI.Widget, {
type: "bi.label",
cls: "panel-title-text",
text: o.title,
height: 30
height: o.titleHeight
});
this.button_group = BI.createWidget({
@ -58,7 +59,7 @@ BI.Panel = BI.inherit(BI.Widget, {
el: {
type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-header-background bi-border-bottom",
height: 29,
height: o.titleHeight - 1,
items: {
left: [this.text],
right: [this.button_group]
@ -66,7 +67,7 @@ BI.Panel = BI.inherit(BI.Widget, {
lhgap: 10,
rhgap: 10
},
height: 29
height: o.titleHeight - 1
};
},

26
src/widget/numberinterval/numberinterval.js

@ -36,7 +36,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
BI.NumberInterval.superclass._init.apply(this, arguments);
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
height: o.height - (o.simple ? 1 : 2),
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
@ -55,13 +55,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
return true;
},
cls: "number-interval-small-editor bi-border"
cls: "number-interval-small-editor " + (o.simple ? "bi-border-bottom" : "bi-border")
});
this.smallTip = BI.createWidget({
type: "bi.label",
text: o.numTip,
height: o.height - 2,
height: o.height - (o.simple ? 1 : 2),
invisible: true
});
BI.createWidget({
@ -76,7 +76,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
height: o.height - (o.simple ? 1 : 2),
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
@ -93,13 +93,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
return true;
},
cls: "number-interval-big-editor bi-border"
cls: "number-interval-big-editor" + (o.simple ? " bi-border-bottom" : " bi-border")
});
this.bigTip = BI.createWidget({
type: "bi.label",
text: o.numTip,
height: o.height - 2,
height: o.height - (o.simple ? 1 : 2),
invisible: true
});
BI.createWidget({
@ -113,8 +113,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
});
this.smallCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",
height: o.height - 2,
cls: "number-interval-small-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right"),
height: o.height - (o.simple ? 0 : 2),
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font",
@ -132,8 +132,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",
height: o.height - 2,
cls: "number-interval-big-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left"),
height: o.height - (o.simple ? 0 : 2),
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font",
@ -152,9 +152,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.label = BI.createWidget({
type: "bi.label",
text: BI.i18nText("BI-Basic_Value"),
textHeight: o.height - c.border * 2,
width: c.width - c.border * 2,
height: o.height - c.border * 2,
textHeight: o.height - (o.simple ? 0 : c.border * 2),
width: c.width - (o.simple ? 0 : c.border * 2),
height: o.height - (o.simple ? 0 : c.border * 2),
level: "warning",
tipType: "warning"
});

Loading…
Cancel
Save