Browse Source

Merge pull request #204101 in DEC/fineui from master to feature/x

* commit '01b22956bbc86a992696c5bd793a77af2e0fc229': (21 commits)
  auto upgrade version to 2.0.20221024101340
  无JIRA fix: 修复tape布局 NaN的场景
  auto upgrade version to 2.0.20221023144426
  Revert "无JIRA fix: _initElementHeight和_initElementWidth方法修复"
  无JIRA fix: 文本过滤组件
  auto upgrade version to 2.0.20221023105429
  反了
  auto upgrade version to 2.0.20221022222430
  bugfix
  bugfix
  toPix 和 pixFormat
  无JIRA fix: _initElementHeight和_initElementWidth方法修复
  auto upgrade version to 2.0.20221022202435
  auto upgrade version to 2.0.20221022183431
  增加toPix方法
  auto upgrade version to 2.0.20221022172437
  bugfix
  auto upgrade version to 2.0.20221022134428
  无JIRA 添加BI.execWithContext
  无JIRA feat: 复选下拉框内水印自适应
  ...
master
superman 2 years ago
parent
commit
1c765859c4
  1. 2
      examples/useContext.html
  2. 2
      package.json
  3. 6
      src/base/layer/layer.popup.js
  4. 6
      src/base/single/1.text.js
  5. 8
      src/base/single/button/buttons/button.js
  6. 1
      src/base/single/tip/tip.toast.js
  7. 4
      src/case/colorchooser/colorchooser.js
  8. 6
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  9. 6
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  10. 6
      src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js
  11. 6
      src/case/combo/textvaluecombo/combo.textvalue.js
  12. 4
      src/case/layer/panel.js
  13. 2
      src/case/linearsegment/button.linear.segment.js
  14. 2
      src/case/segment/segment.js
  15. 8
      src/case/trigger/trigger.editor.js
  16. 20
      src/case/trigger/trigger.icon.text.js
  17. 5
      src/case/trigger/trigger.text.js
  18. 2
      src/case/trigger/trigger.text.select.small.js
  19. 2
      src/case/trigger/trigger.text.small.js
  20. 14
      src/core/4.widget.js
  21. 17
      src/core/constant/var.js
  22. 8
      src/core/wrapper/layout.js
  23. 8
      src/core/wrapper/layout/layout.flow.js
  24. 4
      src/core/wrapper/layout/layout.tape.js
  25. 5
      src/less/base/single/editor/editor.textarea.less
  26. 1
      src/less/widget/year/popup.year.less
  27. 2
      src/widget/date/calendar/popup.month.js
  28. 10
      src/widget/dynamicdate/dynamicdate.combo.js
  29. 2
      src/widget/dynamicdate/dynamicdate.param.item.js
  30. 6
      src/widget/dynamicdate/dynamicdate.popup.js
  31. 8
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  32. 6
      src/widget/dynamicdatetime/dynamicdatetime.popup.js
  33. 4
      src/widget/editor/editor.search.js
  34. 4
      src/widget/editor/editor.text.js
  35. 8
      src/widget/intervalslider/intervalslider.js
  36. 16
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  37. 12
      src/widget/multilayersingletree/multilayersingletree.combo.js
  38. 2
      src/widget/multiselect/multiselect.combo.js
  39. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  40. 2
      src/widget/multiselect/multiselect.insert.combo.js
  41. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  42. 2
      src/widget/multiselect/multiselect.loader.nobar.js
  43. 4
      src/widget/multiselect/search/multiselect.search.insert.pane.js
  44. 7
      src/widget/multiselectlist/multiselectlist.insert.js
  45. 2
      src/widget/multitree/multi.tree.combo.js
  46. 2
      src/widget/multitree/multi.tree.insert.combo.js
  47. 2
      src/widget/multitree/multi.tree.list.combo.js
  48. 4
      src/widget/numbereditor/number.editor.js
  49. 18
      src/widget/numberinterval/numberinterval.js
  50. 2
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js
  51. 6
      src/widget/selecttree/selecttree.combo.js
  52. 5
      src/widget/singleselect/search/singleselect.search.pane.insert.js
  53. 4
      src/widget/singleselect/search/singleselect.search.pane.js
  54. 2
      src/widget/singleselect/singleselect.combo.js
  55. 2
      src/widget/singleselect/singleselect.insert.combo.js
  56. 8
      src/widget/singleselect/singleselectlist.insert.js
  57. 4
      src/widget/singleslider/singleslider.js
  58. 2
      src/widget/singleslider/singleslider.label.js
  59. 6
      src/widget/singletree/singletree.combo.js
  60. 8
      src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js
  61. 4
      src/widget/time/time.combo.js
  62. 4
      src/widget/year/combo.year.js
  63. 8
      src/widget/year/popup.year.js
  64. 2
      src/widget/yearmonth/card.static.yearmonth.js
  65. 6
      src/widget/yearmonth/combo.yearmonth.js
  66. 6
      src/widget/yearmonth/popup.yearmonth.js
  67. 4
      src/widget/yearquarter/combo.yearquarter.js
  68. 6
      src/widget/yearquarter/popup.yearquarter.js

2
examples/useContext.html

@ -56,6 +56,8 @@
return "calc(var(--css-scale) * " + pix + "px)"; return "calc(var(--css-scale) * " + pix + "px)";
}; };
BI.toPix = BI.pixFormat;
var Child = BI.inherit(BI.Widget, { var Child = BI.inherit(BI.Widget, {
render: function () { render: function () {
var label; var label;

2
package.json

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

6
src/base/layer/layer.popup.js

@ -60,8 +60,8 @@ BI.PopupView = BI.inherit(BI.Widget, {
} }
this.element.css({ this.element.css({
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_popup,
"min-width": BI.isNumeric(o.minWidth) ? (BI.pixFormat(o.minWidth)) : o.minWidth, "min-width": BI.pixFormat(o.minWidth),
"max-width": BI.isNumeric(o.maxWidth) ? (BI.pixFormat(o.maxWidth)) : o.maxWidth, "max-width": BI.pixFormat(o.maxWidth),
}).bind({ click: fn }); }).bind({ click: fn });
this.element.bind("mousewheel", fn); this.element.bind("mousewheel", fn);
@ -135,7 +135,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
var o = this.options; var o = this.options;
this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value }); this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value });
this.button_group.element.css({ this.button_group.element.css({
"min-height": BI.isNumeric(o.minHeight) ? (BI.pixFormat(o.minHeight)) : o.minHeight, "min-height": BI.pixFormat(o.minHeight),
"padding-top": BI.pixFormat(o.innerVgap), "padding-top": BI.pixFormat(o.innerVgap),
"padding-bottom": BI.pixFormat(o.innerVgap), "padding-bottom": BI.pixFormat(o.innerVgap),
"padding-left": BI.pixFormat(o.innerHgap), "padding-left": BI.pixFormat(o.innerHgap),

6
src/base/single/1.text.js

@ -45,13 +45,13 @@
}); });
} }
if (BI.isWidthOrHeight(o.height)) { if (BI.isWidthOrHeight(o.height)) {
this.element.css({ lineHeight: BI.isNumber(o.height) ? BI.pixFormat(o.height) : o.height }); this.element.css({ lineHeight: BI.pixFormat(o.height) });
} }
if (BI.isWidthOrHeight(o.lineHeight)) { if (BI.isWidthOrHeight(o.lineHeight)) {
this.element.css({ lineHeight: BI.isNumber(o.lineHeight) ? BI.pixFormat(o.lineHeight) : o.lineHeight }); this.element.css({ lineHeight: BI.pixFormat(o.lineHeight) });
} }
if (BI.isWidthOrHeight(o.maxWidth)) { if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({ maxWidth: BI.isNumber(o.maxWidth) ? BI.pixFormat(o.maxWidth) : o.maxWidth }); this.element.css({ maxWidth: BI.pixFormat(o.maxWidth) });
} }
this.element.css({ this.element.css({
textAlign: o.textAlign, textAlign: o.textAlign,

8
src/base/single/button/buttons/button.js

@ -98,8 +98,8 @@
type: "bi.icon_label", type: "bi.icon_label",
cls: o.loading ? loadingCls : (o.iconCls || o.icon), cls: o.loading ? loadingCls : (o.iconCls || o.icon),
width: this._const.iconWidth, width: this._const.iconWidth,
height: BI.pixFormat(lineHeight, hasBorder ? 2 : 0), height: BI.toPix(lineHeight, hasBorder ? 2 : 0),
lineHeight: BI.pixFormat(lineHeight, hasBorder ? 2 : 0), lineHeight: BI.toPix(lineHeight, hasBorder ? 2 : 0),
// 不设置,自定义按钮无法居中 // 不设置,自定义按钮无法居中
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
@ -120,8 +120,8 @@
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
textAlign: o.textAlign, textAlign: o.textAlign,
textWidth: textWidth, textWidth: textWidth,
textHeight: BI.pixFormat(textHeight, hasBorder ? 2 : 0), textHeight: BI.toPix(textHeight, hasBorder ? 2 : 0),
height: BI.pixFormat(lineHeight, hasBorder ? 2 : 0), height: BI.toPix(lineHeight, hasBorder ? 2 : 0),
value: o.value, value: o.value,
title: null, title: null,
}); });

1
src/base/single/tip/tip.toast.js

@ -30,7 +30,6 @@ BI.Toast = BI.inherit(BI.Tip, {
render: function () { render: function () {
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.element.css({ this.element.css({
// 这里直接使用px即可
minWidth: BI.pixFormat(o.closable ? c.closableMinWidth : c.minWidth), minWidth: BI.pixFormat(o.closable ? c.closableMinWidth : c.minWidth),
maxWidth: BI.pixFormat(o.closable ? c.closableMaxWidth : c.maxWidth), maxWidth: BI.pixFormat(o.closable ? c.closableMaxWidth : c.maxWidth),
}); });

4
src/case/colorchooser/colorchooser.js

@ -36,8 +36,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger = _ref; self.trigger = _ref;
}, },
value: o.value, value: o.value,
width: o.el.type ? o.width : BI.pixFormat(o.width, 2), width: o.el.type ? o.width : BI.toPix(o.width, 2),
height: o.el.type ? o.height : BI.pixFormat(o.height, 2) height: o.el.type ? o.height : BI.toPix(o.height, 2)
}, o.el), }, o.el),
popup: () => ({ popup: () => ({
el: BI.extend({ el: BI.extend({

6
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -26,7 +26,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_icon_text_trigger", type: "bi.select_icon_text_trigger",
cls: "icon-text-value-trigger", cls: "icon-text-value-trigger",
items: o.items, items: o.items,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
text: o.text, text: o.text,
iconCls: o.iconCls, iconCls: o.iconCls,
value: o.value, value: o.value,
@ -54,8 +54,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}); });
this.textIconCombo = BI.createWidget({ this.textIconCombo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
element: this, element: this,
container: o.container, container: o.container,
direction: o.direction, direction: o.direction,

6
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -28,8 +28,8 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow", cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow",
container: o.container, container: o.container,
adjustLength: 2, adjustLength: 2,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
ref: function () { ref: function () {
self.combo = this; self.combo = this;
}, },
@ -41,7 +41,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
self.trigger = this; self.trigger = this;
}, },
items: o.items, items: o.items,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
value: o.value, value: o.value,

6
src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js

@ -27,7 +27,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
type: "bi.select_text_trigger", type: "bi.select_text_trigger",
cls: "text-value-trigger", cls: "text-value-trigger",
items: o.items, items: o.items,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
text: o.text, text: o.text,
value: o.value value: o.value
}); });
@ -50,8 +50,8 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
container: o.container, container: o.container,
direction: o.direction, direction: o.direction,
element: this, element: this,
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
adjustLength: 2, adjustLength: 2,
el: this.trigger, el: this.trigger,
popup: { popup: {

6
src/case/combo/textvaluecombo/combo.textvalue.js

@ -55,7 +55,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
ref: ref => this.trigger = ref, ref: ref => this.trigger = ref,
cls: "text-value-trigger", cls: "text-value-trigger",
items: o.items, items: o.items,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
value: o.value, value: o.value,
title, title,
@ -116,8 +116,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return { return {
type: "bi.combo", type: "bi.combo",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
ref: ref => this.combo = ref, ref: ref => this.combo = ref,
container: o.container, container: o.container,
direction: o.direction, direction: o.direction,

4
src/case/layer/panel.js

@ -59,7 +59,7 @@ BI.Panel = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.left_right_vertical_adapt", type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-header-background bi-border-bottom", cls: "panel-title bi-header-background bi-border-bottom",
height: BI.pixFormat(o.titleHeight, 1), height: BI.toPix(o.titleHeight, 1),
items: { items: {
left: [this.text], left: [this.text],
right: [this.button_group] right: [this.button_group]
@ -67,7 +67,7 @@ BI.Panel = BI.inherit(BI.Widget, {
lhgap: 10, lhgap: 10,
rhgap: 10 rhgap: 10
}, },
height: BI.pixFormat(o.titleHeight, 1) height: BI.toPix(o.titleHeight, 1)
}; };
}, },

2
src/case/linearsegment/button.linear.segment.js

@ -15,7 +15,7 @@ BI.LinearSegmentButton = BI.inherit(BI.BasicButton, {
type: "bi.label", type: "bi.label",
text: o.text, text: o.text,
height: o.height, height: o.height,
textHeight: BI.pixFormat(o.height, 2), textHeight: BI.toPix(o.height, 2),
value: o.value, value: o.value,
hgap: o.hgap, hgap: o.hgap,
ref: function () { ref: function () {

2
src/case/segment/segment.js

@ -22,7 +22,7 @@ BI.Segment = BI.inherit(BI.Widget, {
value: o.value, value: o.value,
items: BI.createItems(o.items, { items: BI.createItems(o.items, {
type: "bi.segment_button", type: "bi.segment_button",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
whiteSpace: o.whiteSpace whiteSpace: o.whiteSpace
}), }),
layout: [ layout: [

8
src/case/trigger/trigger.editor.js

@ -24,7 +24,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
value: o.value, value: o.value,
validationChecker: o.validationChecker, validationChecker: o.validationChecker,
quitChecker: o.quitChecker, quitChecker: o.quitChecker,
@ -57,7 +57,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
items: [ items: [
{ {
el: this.editor, el: this.editor,
@ -65,9 +65,9 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
}, { }, {
el: { el: {
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
width: o.triggerWidth || BI.pixFormat(o.height, 2) width: o.triggerWidth || BI.toPix(o.height, 2)
}, },
width: o.triggerWidth || BI.pixFormat(o.height, 2) width: ""
} }
] ]
}); });

20
src/case/trigger/trigger.icon.text.js

@ -42,7 +42,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: [BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height), "fill", o.triggerWidth || o.height], columnSize: ["", "fill", ""],
ref: function (_ref) { ref: function (_ref) {
self.wrapper = _ref; self.wrapper = _ref;
}, },
@ -50,7 +50,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
el: { el: {
type: "bi.icon_change_button", type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon", cls: "icon-combo-trigger-icon",
width: o.triggerWidth || o.height,
iconCls: o.iconCls, iconCls: o.iconCls,
invisible: !o.iconCls,
ref: function (_ref) { ref: function (_ref) {
self.icon = _ref; self.icon = _ref;
}, },
@ -74,21 +76,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
setIcon: function (iconCls) { setIcon: function (iconCls) {
var o = this.options; var o = this.options;
this.icon.setIcon(iconCls); this.icon.setIcon(iconCls);
var iconItem = this.wrapper.attr("items")[0]; this.icon.setVisible(!!iconCls);
var textItem = this.wrapper.attr("items")[1];
if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) {
if (iconItem.width !== 0) {
iconItem.width = 0;
textItem.lgap = 5;
this.wrapper.resize();
}
} else {
if (iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.iconWrapperWidth || o.height);
textItem.lgap = 0;
this.wrapper.resize();
}
}
}, },
setTextCls: function (cls) { setTextCls: function (cls) {

5
src/case/trigger/trigger.text.js

@ -60,7 +60,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
return ({ return ({
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: ["fill", o.triggerWidth || o.height], columnSize: ["fill", ""],
items: [ items: [
{ {
el: label, el: label,
@ -68,6 +68,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
}, { }, {
el: o.allowClear ? { el: o.allowClear ? {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
width: o.triggerWidth || o.height,
height: o.height,
horizontalAlign: "left", horizontalAlign: "left",
scrollable: false, scrollable: false,
items: [ items: [
@ -80,7 +82,6 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
cls: "close-h-font " + (o.allowClear ? "clear-button" : ""), cls: "close-h-font " + (o.allowClear ? "clear-button" : ""),
stopPropagation: true, stopPropagation: true,
width: o.triggerWidth || o.height, width: o.triggerWidth || o.height,
height: o.height,
invisible: !BI.isNotEmptyString(o.text), invisible: !BI.isNotEmptyString(o.text),
handler: function () { handler: function () {
self.fireEvent(BI.TextTrigger.EVENT_CLEAR); self.fireEvent(BI.TextTrigger.EVENT_CLEAR);

2
src/case/trigger/trigger.text.select.small.js

@ -20,7 +20,7 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.small_text_trigger", type: "bi.small_text_trigger",
element: this, element: this,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
text: obj.text, text: obj.text,
cls: obj.cls, cls: obj.cls,
textHgap: o.textHgap, textHgap: o.textHgap,

2
src/case/trigger/trigger.text.small.js

@ -43,7 +43,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
width: "fill" width: "fill"
}, { }, {
el: this.trigerButton, el: this.trigerButton,
width: o.triggerWidth || o.height width: ""
} }
] ]
}); });

14
src/core/4.widget.js

@ -289,14 +289,14 @@
_initElementWidth: function () { _initElementWidth: function () {
var o = this.options; var o = this.options;
if (BI.isWidthOrHeight(o.width)) { if (BI.isWidthOrHeight(o.width)) {
this.element.css("width", BI.isNumber(o.width) ? BI.pixFormat(o.width) : o.width); this.element.css("width", BI.pixFormat(o.width));
} }
}, },
_initElementHeight: function () { _initElementHeight: function () {
var o = this.options; var o = this.options;
if (BI.isWidthOrHeight(o.height)) { if (BI.isWidthOrHeight(o.height)) {
this.element.css("height", BI.isNumber(o.height) ? BI.pixFormat(o.height) : o.height); this.element.css("height", BI.pixFormat(o.height));
} }
}, },
@ -927,6 +927,16 @@
return vm; return vm;
}; };
BI.execWithContext = function (_context, fn) {
BI.Widget.pushContext(_context);
try {
fn();
} catch (e) {
// nothing
}
BI.Widget.popContext();
};
BI.watch = function (vm, watch, handler) { BI.watch = function (vm, watch, handler) {
// 必须要保证组件当前环境存在 // 必须要保证组件当前环境存在
if (BI.Widget.current) { if (BI.Widget.current) {

17
src/core/constant/var.js

@ -15,12 +15,13 @@ BI._.extend(BI, {
emptyStr: "", emptyStr: "",
pixUnit: "px", pixUnit: "px",
pixRatio: 1, pixRatio: 1,
// 一定返回最终的单位
pixFormat: function (pix, border) { pixFormat: function (pix, border) {
if (!BI.isNumber(pix)) { if (!BI.isNumber(pix)) {
return pix; return pix;
} }
if (BI.pixUnit === "px" && BI.pixRatio === 1) { if (BI.pixUnit === "px") {
return (pix - (border || 0)) / BI.pixRatio + BI.pixUnit; return (pix / BI.pixRatio - (border || 0)) + BI.pixUnit;
} }
var length = pix / BI.pixRatio + BI.pixUnit; var length = pix / BI.pixRatio + BI.pixUnit;
if (border > 0) { if (border > 0) {
@ -28,6 +29,18 @@ BI._.extend(BI, {
} }
return length; return length;
}, },
toPix: function (pix, border) {
if (!BI.isNumber(pix)) {
return pix;
}
if (BI.pixUnit === "px") {
return pix - (border || 0) * BI.pixRatio;
}
if (border > 0) {
return `calc(${pix / BI.pixRatio + BI.pixUnit} - ${border + "px"})`;
}
return pix;
},
emptyFn: function () { emptyFn: function () {
}, },
empty: null, empty: null,

8
src/core/wrapper/layout.js

@ -42,16 +42,16 @@ BI.Layout = BI.inherit(BI.Widget, {
_init4Margin: function () { _init4Margin: function () {
if (this.options.top) { if (this.options.top) {
this.element.css("top", BI.isNumber(this.options.top) ? BI.pixFormat(this.options.top) : this.options.top); this.element.css("top", BI.pixFormat(this.options.top));
} }
if (this.options.left) { if (this.options.left) {
this.element.css("left", BI.isNumber(this.options.left) ? BI.pixFormat(this.options.left) : this.options.left); this.element.css("left", BI.pixFormat(this.options.left));
} }
if (this.options.bottom) { if (this.options.bottom) {
this.element.css("bottom", BI.isNumber(this.options.bottom) ? BI.pixFormat(this.options.bottom) : this.options.bottom); this.element.css("bottom", BI.pixFormat(this.options.bottom));
} }
if (this.options.right) { if (this.options.right) {
this.element.css("right", BI.isNumber(this.options.right) ? BI.pixFormat(this.options.right) : this.options.right); this.element.css("right", BI.pixFormat(this.options.right));
} }
}, },

8
src/core/wrapper/layout/layout.flow.js

@ -137,16 +137,16 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
var w = BI.FloatRightLayout.superclass._addElement.apply(this, arguments); var w = BI.FloatRightLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", float: "right"}); w.element.css({position: "relative", float: "right"});
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({left: BI.isNumber(item.left) ? BI.pixFormat(item.left) : item.left}); w.element.css({left: BI.pixFormat(item.left)});
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({right: BI.isNumber(item.right) ? BI.pixFormat(item.right) : item.right}); w.element.css({right: BI.pixFormat(item.right)});
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({top: BI.isNumber(item.top) ? BI.pixFormat(item.top) : item.top}); w.element.css({top: BI.pixFormat(item.top)});
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({bottom: BI.isNumber(item.bottom) ? BI.pixFormat(item.bottom) : item.bottom}); w.element.css({bottom: BI.pixFormat(item.bottom)});
} }
if (o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item) !== 0) { if (o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item) !== 0) {
var top = o.vgap / 2 + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item); var top = o.vgap / 2 + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item);

4
src/core/wrapper/layout/layout.tape.js

@ -92,7 +92,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
left: self._optimiseGap(left[i] + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) + o.hgap + o.lgap) left: self._optimiseGap(left[i] + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) + o.hgap + o.lgap)
}); });
if (columnSize === "" || columnSize === "fill") { if (BI.isNull(columnSize) || columnSize === "" || columnSize === "fill") {
return true; return true;
} }
}); });
@ -110,7 +110,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
right: self._optimiseGap(right[i] + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) + o.hgap + o.rgap) right: self._optimiseGap(right[i] + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) + o.hgap + o.rgap)
}); });
if (columnSize === "" || columnSize === "fill") { if (BI.isNull(columnSize) || columnSize === "" || columnSize === "fill") {
return true; return true;
} }
}); });

5
src/less/base/single/editor/editor.textarea.less

@ -6,11 +6,12 @@
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-all; word-break: break-all;
font-size: @font-size-12; font-size: @font-size-12;
font-size: calc(var(--css-scale, 1) * @font-size-12);
line-height: 21px; line-height: 21px;
& { line-height: calc(var(--css-scale, 1) * 21px);
border: none; border: none;
} }
}
& .textarea-watermark{ & .textarea-watermark{
max-height: 100%; max-height: 100%;
} }

1
src/less/widget/year/popup.year.less

@ -2,7 +2,6 @@
.bi-year-popup { .bi-year-popup {
& .year-popup-navigation { & .year-popup-navigation {
line-height: 30px;
& > .center-element { & > .center-element {
border-left: 1px solid @color-bi-border-year-popup; border-left: 1px solid @color-bi-border-year-popup;
} }

2
src/widget/date/calendar/popup.month.js

@ -68,7 +68,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: BI.pixFormat(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1), height: BI.toPix(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1),
width: 30, width: 30,
value: td, value: td,
text: td, text: td,

10
src/widget/dynamicdate/dynamicdate.combo.js

@ -50,13 +50,13 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
el: { el: {
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: [this.constants.iconWidth, "fill"], columnSize: [this.constants.iconWidth, "fill"],
height: BI.pixFormat(opts.height, border), height: BI.toPix(opts.height, border),
items: [{ items: [{
el: { el: {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font", cls: "bi-trigger-icon-button date-change-h-font",
width: BI.pixFormat(opts.height, border), width: BI.toPix(opts.height, border),
height: BI.pixFormat(opts.height, border), height: BI.toPix(opts.height, border),
ref: function () { ref: function () {
self.changeIcon = this; self.changeIcon = this;
} }
@ -69,8 +69,8 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format, format: opts.format,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
iconWidth: BI.pixFormat(opts.height, border), iconWidth: BI.toPix(opts.height, border),
height: BI.pixFormat(opts.height, border), height: BI.toPix(opts.height, border),
value: opts.value, value: opts.value,
ref: function () { ref: function () {
self.trigger = this; self.trigger = this;

2
src/widget/dynamicdate/dynamicdate.param.item.js

@ -21,7 +21,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.sign_editor", type: "bi.sign_editor",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-focus-shadow bi-border-radius",
height: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 2), height: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 2),
validationChecker: function (v) { validationChecker: function (v) {
return BI.isNaturalNumber(v); return BI.isNaturalNumber(v);
}, },

6
src/widget/dynamicdate/dynamicdate.popup.js

@ -26,7 +26,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
listeners: [{ listeners: [{
eventName: BI.TextButton.EVENT_CHANGE, eventName: BI.TextButton.EVENT_CHANGE,
action: function () { action: function () {
@ -37,7 +37,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true, shadow: true,
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
text: BI.i18nText("BI-Multi_Date_Today"), text: BI.i18nText("BI-Multi_Date_Today"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
ref: function () { ref: function () {
@ -52,7 +52,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{

8
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -8,7 +8,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo", baseCls: "bi-dynamic-date--time-combo",
height: 24, height: 24,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -50,13 +50,13 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
el: { el: {
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: [this.constants.iconWidth, "fill"], columnSize: [this.constants.iconWidth, "fill"],
height: BI.pixFormat(opts.height, border), height: BI.toPix(opts.height, border),
items: [{ items: [{
el: { el: {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font", cls: "bi-trigger-icon-button date-change-h-font",
width: this.constants.iconWidth, width: this.constants.iconWidth,
height: BI.pixFormat(opts.height, border), height: BI.toPix(opts.height, border),
ref: function () { ref: function () {
self.changeIcon = this; self.changeIcon = this;
} }
@ -70,7 +70,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
iconWidth: this.constants.iconWidth, iconWidth: this.constants.iconWidth,
height: BI.pixFormat(opts.height, border), height: BI.toPix(opts.height, border),
value: opts.value, value: opts.value,
ref: function () { ref: function () {
self.trigger = this; self.trigger = this;

6
src/widget/dynamicdatetime/dynamicdatetime.popup.js

@ -25,7 +25,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
items: [[{ items: [[{
type: "bi.text_button", type: "bi.text_button",
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
@ -37,7 +37,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Multi_Date_Today"), text: BI.i18nText("BI-Multi_Date_Today"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
@ -53,7 +53,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{

4
src/widget/editor/editor.search.js

@ -20,7 +20,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor = BI.createWidget(o.el, { this.editor = BI.createWidget(o.el, {
type: "bi.editor", type: "bi.editor",
simple: o.simple, simple: o.simple,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
watermark: o.watermark, watermark: o.watermark,
allowBlank: true, allowBlank: true,
hgap: 1, hgap: 1,
@ -44,7 +44,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
}); });
BI.createWidget({ BI.createWidget({
element: this, element: this,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
type: "bi.htape", type: "bi.htape",
items: [ items: [
{ {

4
src/widget/editor/editor.text.js

@ -29,8 +29,8 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
element: this, element: this,
width: BI.pixFormat(o.width, border), width: BI.toPix(o.width, border),
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
simple: o.simple, simple: o.simple,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,

8
src/widget/intervalslider/intervalslider.js

@ -60,8 +60,8 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
cls: "slider-editor-button", cls: "slider-editor-button",
text: this.options.unit, text: this.options.unit,
allowBlank: false, allowBlank: false,
width: BI.pixFormat(c.EDITOR_WIDTH, 2), width: BI.toPix(c.EDITOR_WIDTH, 2),
height: BI.pixFormat(c.EDITOR_HEIGHT, 2), height: BI.toPix(c.EDITOR_HEIGHT, 2),
validationChecker: function (v) { validationChecker: function (v) {
return self._checkValidation(v); return self._checkValidation(v);
} }
@ -88,8 +88,8 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
cls: "slider-editor-button", cls: "slider-editor-button",
text: this.options.unit, text: this.options.unit,
allowBlank: false, allowBlank: false,
width: BI.pixFormat(c.EDITOR_WIDTH, 2), width: BI.toPix(c.EDITOR_WIDTH, 2),
height: BI.pixFormat(c.EDITOR_HEIGHT, 2), height: BI.toPix(c.EDITOR_HEIGHT, 2),
validationChecker: function (v) { validationChecker: function (v) {
return self._checkValidation(v); return self._checkValidation(v);
} }

16
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -31,8 +31,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
if (o.allowEdit) { if (o.allowEdit) {
return { return {
type: "bi.absolute", type: "bi.absolute",
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
cls, cls,
items: [ items: [
{ {
@ -54,7 +54,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}, },
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
items: o.items, items: o.items,
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
@ -68,8 +68,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
return { return {
type: "bi.combo", type: "bi.combo",
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
container: o.container, container: o.container,
destroyWhenHide: o.destroyWhenHide, destroyWhenHide: o.destroyWhenHide,
adjustLength: 2, adjustLength: 2,
@ -133,7 +133,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
watermark: o.watermark, watermark: o.watermark,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
value: o.value, value: o.value,
@ -209,8 +209,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
ref: function (_ref) { ref: function (_ref) {
self.triggerBtn = _ref; self.triggerBtn = _ref;
}, },
width: BI.pixFormat(o.height, 2), width: BI.toPix(o.height, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
listeners: [ listeners: [
{ {
eventName: BI.TriggerIconButton.EVENT_CHANGE, eventName: BI.TriggerIconButton.EVENT_CHANGE,

12
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -33,8 +33,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
if (o.allowEdit) { if (o.allowEdit) {
return { return {
type: "bi.absolute", type: "bi.absolute",
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
cls, cls,
items: [ items: [
{ {
@ -56,7 +56,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}, },
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
items: o.items, items: o.items,
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
@ -131,7 +131,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
value: o.value, value: o.value,
@ -205,8 +205,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
ref: function (_ref) { ref: function (_ref) {
self.triggerBtn = _ref; self.triggerBtn = _ref;
}, },
width: BI.pixFormat(o.height, 2), width: BI.toPix(o.height, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
listeners: [ listeners: [
{ {
eventName: BI.TriggerIconButton.EVENT_CHANGE, eventName: BI.TriggerIconButton.EVENT_CHANGE,

2
src/widget/multiselect/multiselect.combo.js

@ -45,7 +45,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
masker: { masker: {

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -41,7 +41,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
masker: { masker: {

2
src/widget/multiselect/multiselect.insert.combo.js

@ -40,7 +40,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger", type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
watermark: o.watermark, watermark: o.watermark,
defaultText: o.defaultText, defaultText: o.defaultText,

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -41,7 +41,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger", type: "bi.multi_select_insert_trigger",
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {

2
src/widget/multiselect/multiselect.loader.nobar.js

@ -173,7 +173,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
}, },
resetHeight: function (h) { resetHeight: function (h) {
this.button_group.element.css({ "max-height": BI.pixFormat(h) }); this.button_group.element.css({ "max-height": BI.toPix(h) });
}, },
resetWidth: function () { resetWidth: function () {

4
src/widget/multiselect/search/multiselect.search.insert.pane.js

@ -54,11 +54,11 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
}); });
this.resizer = BI.createWidget({ this.resizer = BI.createWidget({
type: "bi.vtape", type: "bi.vertical_fill",
rowSize: ["", "fill"],
element: this, element: this,
items: [{ items: [{
el: this.addNotMatchTip, el: this.addNotMatchTip,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}, { }, {
el: this.loader, el: this.loader,
}], }],

7
src/widget/multiselectlist/multiselectlist.insert.js

@ -74,7 +74,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
ref: function (ref) { ref: function (ref) {
self.editor = ref; self.editor = ref;
}, },
height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
}, },
isAutoSearch: false, isAutoSearch: false,
isAutoSync: false, isAutoSync: false,
@ -83,7 +82,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
}, },
adapter: this.adapter, adapter: this.adapter,
popup: this.searcherPane, popup: this.searcherPane,
height: 200,
masker: false, masker: false,
listeners: [{ listeners: [{
eventName: BI.Searcher.EVENT_START, eventName: BI.Searcher.EVENT_START,
@ -168,14 +166,13 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.vtape", type: "bi.vertical_fill",
rowSize: ["", "fill"],
element: this, element: this,
items: [{ items: [{
el: this.trigger, el: this.trigger,
height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
}, { }, {
el: this.adapter, el: this.adapter,
height: "fill"
}] }]
}); });
BI.createWidget({ BI.createWidget({

2
src/widget/multitree/multi.tree.combo.js

@ -27,7 +27,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,

2
src/widget/multitree/multi.tree.insert.combo.js

@ -28,7 +28,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,

2
src/widget/multitree/multi.tree.list.combo.js

@ -32,7 +32,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
watermark: o.watermark, watermark: o.watermark,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
masker: { masker: {
offset: { offset: {

4
src/widget/numbereditor/number.editor.js

@ -27,7 +27,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
simple: o.simple, simple: o.simple,
allowBlank: o.allowBlank, allowBlank: o.allowBlank,
value: o.valueFormatter(o.value), value: o.valueFormatter(o.value),
@ -87,7 +87,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.htape",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
element: this, element: this,
items: [this.editor, { items: [this.editor, {
el: { el: {

18
src/widget/numberinterval/numberinterval.js

@ -36,7 +36,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
BI.NumberInterval.superclass._init.apply(this, arguments); BI.NumberInterval.superclass._init.apply(this, arguments);
this.smallEditor = BI.createWidget({ this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor", type: "bi.number_interval_single_editor",
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
watermark: o.watermark, watermark: o.watermark,
allowBlank: o.allowBlank, allowBlank: o.allowBlank,
value: o.min, value: o.min,
@ -61,7 +61,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallTip = BI.createWidget({ this.smallTip = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.numTip, text: o.numTip,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
invisible: true invisible: true
}); });
BI.createWidget({ BI.createWidget({
@ -76,7 +76,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({ this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor", type: "bi.number_interval_single_editor",
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
watermark: o.watermark, watermark: o.watermark,
allowBlank: o.allowBlank, allowBlank: o.allowBlank,
value: o.max, value: o.max,
@ -99,7 +99,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigTip = BI.createWidget({ this.bigTip = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.numTip, text: o.numTip,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
invisible: true invisible: true
}); });
BI.createWidget({ BI.createWidget({
@ -114,8 +114,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallCombo = BI.createWidget({ this.smallCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "number-interval-small-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right bi-border-corner-right-radius"), cls: "number-interval-small-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right bi-border-corner-right-radius"),
height: BI.pixFormat(o.height, o.simple ? 0 : 2), height: BI.toPix(o.height, o.simple ? 0 : 2),
width: BI.pixFormat(c.width, c.border), width: BI.toPix(c.width, c.border),
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font", iconCls: "less-font",
@ -134,8 +134,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigCombo = BI.createWidget({ this.bigCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "number-interval-big-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left bi-border-corner-left-radius"), cls: "number-interval-big-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left bi-border-corner-left-radius"),
height: BI.pixFormat(o.height, o.simple ? 0 : 2), height: BI.toPix(o.height, o.simple ? 0 : 2),
width: BI.pixFormat(c.width, c.border), width: BI.toPix(c.width, c.border),
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font", iconCls: "less-font",
@ -155,7 +155,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Basic_Value"), text: BI.i18nText("BI-Basic_Value"),
textHeight: o.height, textHeight: o.height,
// width: BI.pixFormat(o.width, o.simple ? 0 : c.border * 2), // width: BI.toPix(o.width, o.simple ? 0 : c.border * 2),
hgap: 5, hgap: 5,
height: o.height, height: o.height,
level: "warning", level: "warning",

2
src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

@ -35,7 +35,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger", type: "bi.search_multi_select_trigger",
text: o.text, text: o.text,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
offset: { offset: {

6
src/widget/selecttree/selecttree.combo.js

@ -22,7 +22,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_tree_trigger", type: "bi.single_tree_trigger",
text: o.text, text: o.text,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
items: o.items, items: o.items,
value: o.value, value: o.value,
allowClear: o.allowClear, allowClear: o.allowClear,
@ -41,8 +41,8 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
container: o.container, container: o.container,
element: this, element: this,
adjustLength: 2, adjustLength: 2,

5
src/widget/singleselect/search/singleselect.search.pane.insert.js

@ -15,7 +15,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane-insert bi-card",
allowNoSelect: false, allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
@ -53,7 +53,8 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
}); });
this.resizer = BI.createWidget({ this.resizer = BI.createWidget({
type: "bi.vtape", type: "bi.vertical_fill",
rowSize: ["", "fill"],
element: this, element: this,
items: [{ items: [{
type: "bi.vertical", type: "bi.vertical",

4
src/widget/singleselect/search/singleselect.search.pane.js

@ -53,11 +53,11 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
}); });
this.resizer = BI.createWidget({ this.resizer = BI.createWidget({
type: "bi.vtape", type: "bi.vertical_fill",
rowSize: ["", "fill"],
element: this, element: this,
items: [{ items: [{
el: this.tooltipClick, el: this.tooltipClick,
height: 0
}, { }, {
el: this.loader el: this.loader
}] }]

2
src/widget/singleselect/singleselect.combo.js

@ -31,7 +31,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect, allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit, allowEdit: o.allowEdit,

2
src/widget/singleselect/singleselect.insert.combo.js

@ -32,7 +32,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
watermark: o.watermark, watermark: o.watermark,
height: BI.pixFormat(o.height, o.simple ? 1 : 2), height: BI.toPix(o.height, o.simple ? 1 : 2),
allowNoSelect: o.allowNoSelect, allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
// adapter: this.popup, // adapter: this.popup,

8
src/widget/singleselect/singleselectlist.insert.js

@ -6,7 +6,7 @@
BI.SingleSelectInsertList = BI.inherit(BI.Single, { BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-single-select-insert-list",
allowNoSelect: false, allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemWrapper: BI.emptyFn, itemWrapper: BI.emptyFn,
@ -81,7 +81,6 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
}, },
adapter: this.adapter, adapter: this.adapter,
popup: this.searcherPane, popup: this.searcherPane,
height: 200,
masker: false, masker: false,
value: o.value, value: o.value,
listeners: [{ listeners: [{
@ -124,14 +123,13 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.vtape", type: "bi.vertical_fill",
rowSize: ["", "fill"],
element: this, element: this,
items: [{ items: [{
el: this.trigger, el: this.trigger,
height: 24
}, { }, {
el: this.adapter, el: this.adapter,
height: "fill"
}] }]
}); });
BI.createWidget({ BI.createWidget({

4
src/widget/singleslider/singleslider.js

@ -99,8 +99,8 @@ BI.SingleSlider = BI.inherit(BI.Single, {
type: "bi.sign_text_editor", type: "bi.sign_text_editor",
cls: "slider-editor-button", cls: "slider-editor-button",
text: o.unit, text: o.unit,
width: BI.pixFormat(c.EDITOR_WIDTH, 2), width: BI.toPix(c.EDITOR_WIDTH, 2),
height: BI.pixFormat(c.EDITOR_HEIGHT, 2), height: BI.toPix(c.EDITOR_HEIGHT, 2),
allowBlank: false, allowBlank: false,
textAlign: "center", textAlign: "center",
validationChecker: function (v) { validationChecker: function (v) {

2
src/widget/singleslider/singleslider.label.js

@ -97,7 +97,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
this.label = BI.createWidget({ this.label = BI.createWidget({
type: "bi.label", type: "bi.label",
height: c.HEIGHT, height: c.HEIGHT,
width: BI.pixFormat(c.EDITOR_WIDTH, 2) width: BI.toPix(c.EDITOR_WIDTH, 2)
}); });
this._setVisible(false); this._setVisible(false);

6
src/widget/singletree/singletree.combo.js

@ -24,7 +24,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
type: "bi.single_tree_trigger", type: "bi.single_tree_trigger",
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
items: o.items, items: o.items,
value: o.value, value: o.value,
allowClear: o.allowClear, allowClear: o.allowClear,
@ -43,8 +43,8 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
container: o.container, container: o.container,
element: this, element: this,
adjustLength: 2, adjustLength: 2,

8
src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -5,7 +5,7 @@
BI.TextValueDownListCombo = BI.inherit(BI.Widget, { BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function (config) { _defaultConfig: function (config) {
return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-value-down-list-combo " + (config.simple ? "bi-border-bottom" : "bi-border"), baseCls: "bi-text-value-down-list-combo bi-border-radius " + (config.simple ? "bi-border-bottom" : "bi-border"),
height: 24, height: 24,
}); });
}, },
@ -22,7 +22,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger", type: "bi.down_list_select_text_trigger",
cls: "text-value-down-list-trigger", cls: "text-value-down-list-trigger",
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
items: o.items, items: o.items,
text: o.text, text: o.text,
value: value value: value
@ -33,8 +33,8 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
element: this, element: this,
chooseType: BI.Selection.Single, chooseType: BI.Selection.Single,
adjustLength: 2, adjustLength: 2,
width: BI.pixFormat(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.pixFormat(o.height, 2), height: BI.toPix(o.height, 2),
el: this.trigger, el: this.trigger,
value: BI.isNull(value) ? [] : [value], value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items) items: BI.deepClone(o.items)

4
src/widget/time/time.combo.js

@ -72,10 +72,10 @@
el: { el: {
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: ["fill", this.constants.iconWidth], columnSize: ["fill", this.constants.iconWidth],
height: BI.pixFormat(opts.height, 2), height: BI.toPix(opts.height, 2),
items: [{ items: [{
type: "bi.time_trigger", type: "bi.time_trigger",
height: BI.pixFormat(opts.height, 2), height: BI.toPix(opts.height, 2),
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,

4
src/widget/year/combo.year.js

@ -23,7 +23,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
simple: o.simple, simple: o.simple,
min: o.minDate, min: o.minDate,
max: o.maxDate, max: o.maxDate,
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
value: o.value || "", value: o.value || "",
watermark: o.watermark watermark: o.watermark
}); });
@ -143,7 +143,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button", cls: "bi-trigger-icon-button",
width: this._const.iconWidth, width: this._const.iconWidth,
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
ref: function () { ref: function () {
self.changeIcon = this; self.changeIcon = this;
} }

8
src/widget/year/popup.year.js

@ -11,7 +11,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}, },
props: { props: {
baseCls: "bi-year-popup", baseCls: "bi-dynamic-year-popup",
behaviors: {}, behaviors: {},
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期, max: "2099-12-31", // 最大日期,
@ -32,7 +32,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
items: [[{ items: [[{
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
@ -43,7 +43,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}] }]
}, { }, {
type: "bi.text_button", type: "bi.text_button",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Current_Year"), text: BI.i18nText("BI-Basic_Current_Year"),
@ -60,7 +60,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{

2
src/widget/yearmonth/card.static.yearmonth.js

@ -19,7 +19,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: BI.pixFormat(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1), height: BI.toPix(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1),
width: 38, width: 38,
value: td, value: td,
text: td, text: td,

6
src/widget/yearmonth/combo.yearmonth.js

@ -22,7 +22,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
simple: o.simple, simple: o.simple,
min: o.minDate, min: o.minDate,
max: o.maxDate, max: o.maxDate,
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
value: o.value || "", value: o.value || "",
watermark: o.watermark, watermark: o.watermark,
}); });
@ -142,8 +142,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
el: { el: {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button", cls: "bi-trigger-icon-button",
width: BI.pixFormat(o.height, border), width: BI.toPix(o.height, border),
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
ref: function () { ref: function () {
self.changeIcon = this; self.changeIcon = this;
} }

6
src/widget/yearmonth/popup.yearmonth.js

@ -32,7 +32,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
items: [[{ items: [[{
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
@ -44,7 +44,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Current_Month"), text: BI.i18nText("BI-Basic_Current_Month"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
@ -60,7 +60,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{

4
src/widget/yearquarter/combo.yearquarter.js

@ -25,7 +25,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
simple: o.simple, simple: o.simple,
min: o.minDate, min: o.minDate,
max: o.maxDate, max: o.maxDate,
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
value: o.value || "", value: o.value || "",
watermark: o.watermark, watermark: o.watermark,
}); });
@ -146,7 +146,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-trigger-icon-button", cls: "bi-trigger-icon-button",
width: this._consts.iconWidth, width: this._consts.iconWidth,
height: BI.pixFormat(o.height, border), height: BI.toPix(o.height, border),
ref: function () { ref: function () {
self.changeIcon = this; self.changeIcon = this;
} }

6
src/widget/yearquarter/popup.yearquarter.js

@ -27,7 +27,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
shadow: true, shadow: true,
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
eventName: BI.TextButton.EVENT_CHANGE, eventName: BI.TextButton.EVENT_CHANGE,
@ -38,7 +38,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Current_Quarter"), text: BI.i18nText("BI-Basic_Current_Quarter"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
@ -55,7 +55,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
shadow: true, shadow: true,
textHeight: BI.pixFormat(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1), textHeight: BI.toPix(BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, 1),
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{
eventName: BI.TextButton.EVENT_CHANGE, eventName: BI.TextButton.EVENT_CHANGE,

Loading…
Cancel
Save