From 552bb272921da7d87d7a5c9bfb031cad887718f7 Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 21 Oct 2022 19:34:43 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E6=97=A0JIRA=20feat:=20=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=8B=89=E6=A1=86=E5=86=85=E6=B0=B4=E5=8D=B0?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/editor/editor.textarea.less | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/less/base/single/editor/editor.textarea.less b/src/less/base/single/editor/editor.textarea.less index dc0a77a03..24554c425 100644 --- a/src/less/base/single/editor/editor.textarea.less +++ b/src/less/base/single/editor/editor.textarea.less @@ -6,10 +6,11 @@ white-space: pre-wrap; word-break: break-all; font-size: @font-size-12; + font-size: calc(var(--css-scale, @font-size-12) * 1px); line-height: 21px; - & { - border: none; - } + line-height: calc(var(--css-scale, 21) * 1px); + + border: none; } & .textarea-watermark{ max-height: 100%; From 47ecf338bde5ef54e3d687df2958dce234c243f9 Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 21 Oct 2022 19:55:12 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=E6=97=A0JIRA=20feat:=20=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=8B=89=E6=A1=86=E5=86=85=E6=B0=B4=E5=8D=B0?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/editor/editor.textarea.less | 4 ++-- src/less/widget/year/popup.year.less | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/less/base/single/editor/editor.textarea.less b/src/less/base/single/editor/editor.textarea.less index 24554c425..e5e8152be 100644 --- a/src/less/base/single/editor/editor.textarea.less +++ b/src/less/base/single/editor/editor.textarea.less @@ -6,9 +6,9 @@ white-space: pre-wrap; word-break: break-all; font-size: @font-size-12; - font-size: calc(var(--css-scale, @font-size-12) * 1px); + font-size: calc(var(--css-scale, 1) * @font-size-12); line-height: 21px; - line-height: calc(var(--css-scale, 21) * 1px); + line-height: calc(var(--css-scale, 1) * 21px); border: none; } diff --git a/src/less/widget/year/popup.year.less b/src/less/widget/year/popup.year.less index 148f40508..2d9e7e133 100644 --- a/src/less/widget/year/popup.year.less +++ b/src/less/widget/year/popup.year.less @@ -2,7 +2,6 @@ .bi-year-popup { & .year-popup-navigation { - line-height: 30px; & > .center-element { border-left: 1px solid @color-bi-border-year-popup; } @@ -26,4 +25,4 @@ } } } -} \ No newline at end of file +} From 91a795f55f3f8139dd608e29cb408eb8020bda81 Mon Sep 17 00:00:00 2001 From: zsmj Date: Sat, 22 Oct 2022 13:22:36 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E6=97=A0JIRA=20=E6=B7=BB=E5=8A=A0BI.exec?= =?UTF-8?q?WithContext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index bca87b9fc..8be3a9058 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -927,6 +927,16 @@ 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) { // 必须要保证组件当前环境存在 if (BI.Widget.current) { From d99a2b21687a9ce71fc811329cd44a3d6acac5bf Mon Sep 17 00:00:00 2001 From: data Date: Sat, 22 Oct 2022 13:44:35 +0800 Subject: [PATCH 04/21] auto upgrade version to 2.0.20221022134428 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d247c3dab..99dc9a0bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221021181414", + "version": "2.0.20221022134428", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 802d9845763e04611a625c885486a3b9477c6869 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Oct 2022 17:01:22 +0800 Subject: [PATCH 05/21] bugfix --- src/case/trigger/trigger.editor.js | 2 +- src/case/trigger/trigger.icon.text.js | 20 ++++--------------- src/case/trigger/trigger.text.js | 5 +++-- src/case/trigger/trigger.text.small.js | 2 +- .../combo.textvaluedownlist.js | 2 +- 5 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/case/trigger/trigger.editor.js b/src/case/trigger/trigger.editor.js index 4998ea583..7b2c39e3c 100644 --- a/src/case/trigger/trigger.editor.js +++ b/src/case/trigger/trigger.editor.js @@ -67,7 +67,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, { type: "bi.trigger_icon_button", width: o.triggerWidth || BI.pixFormat(o.height, 2) }, - width: o.triggerWidth || BI.pixFormat(o.height, 2) + width: "" } ] }); diff --git a/src/case/trigger/trigger.icon.text.js b/src/case/trigger/trigger.icon.text.js index 36d156e13..a102b5d0c 100644 --- a/src/case/trigger/trigger.icon.text.js +++ b/src/case/trigger/trigger.icon.text.js @@ -42,7 +42,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { BI.createWidget({ element: this, type: "bi.horizontal_fill", - columnSize: [BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height), "fill", o.triggerWidth || o.height], + columnSize: ["", "fill", ""], ref: function (_ref) { self.wrapper = _ref; }, @@ -50,7 +50,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { el: { type: "bi.icon_change_button", cls: "icon-combo-trigger-icon", + width: o.triggerWidth || o.height, iconCls: o.iconCls, + invisible: !o.iconCls, ref: function (_ref) { self.icon = _ref; }, @@ -74,21 +76,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { setIcon: function (iconCls) { var o = this.options; this.icon.setIcon(iconCls); - var iconItem = this.wrapper.attr("items")[0]; - 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(); - } - } + this.icon.setVisible(!!iconCls); }, setTextCls: function (cls) { diff --git a/src/case/trigger/trigger.text.js b/src/case/trigger/trigger.text.js index fe72fde60..6e7273252 100644 --- a/src/case/trigger/trigger.text.js +++ b/src/case/trigger/trigger.text.js @@ -60,7 +60,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, { return ({ type: "bi.horizontal_fill", - columnSize: ["fill", o.triggerWidth || o.height], + columnSize: ["fill", ""], items: [ { el: label, @@ -68,6 +68,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, { }, { el: o.allowClear ? { type: "bi.vertical_adapt", + width: o.triggerWidth || o.height, + height: o.height, horizontalAlign: "left", scrollable: false, items: [ @@ -80,7 +82,6 @@ BI.TextTrigger = BI.inherit(BI.Trigger, { cls: "close-h-font " + (o.allowClear ? "clear-button" : ""), stopPropagation: true, width: o.triggerWidth || o.height, - height: o.height, invisible: !BI.isNotEmptyString(o.text), handler: function () { self.fireEvent(BI.TextTrigger.EVENT_CLEAR); diff --git a/src/case/trigger/trigger.text.small.js b/src/case/trigger/trigger.text.small.js index 6fbb04c3c..27c395a69 100644 --- a/src/case/trigger/trigger.text.small.js +++ b/src/case/trigger/trigger.text.small.js @@ -43,7 +43,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, { width: "fill" }, { el: this.trigerButton, - width: o.triggerWidth || o.height + width: "" } ] }); diff --git a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js index 146472c30..2a1e254fd 100644 --- a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js +++ b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js @@ -5,7 +5,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { _defaultConfig: function (config) { 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, }); }, From 96b732a4d056442228ef1f492c44116253509e5f Mon Sep 17 00:00:00 2001 From: data Date: Sat, 22 Oct 2022 17:24:43 +0800 Subject: [PATCH 06/21] auto upgrade version to 2.0.20221022172437 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99dc9a0bf..b468a5c37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221022134428", + "version": "2.0.20221022172437", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 3157371f890cbb457e68174dd14c9639a0b8bc93 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Oct 2022 18:07:13 +0800 Subject: [PATCH 07/21] =?UTF-8?q?=E5=A2=9E=E5=8A=A0toPix=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/layer/layer.popup.js | 16 ++++++++-------- src/base/single/1.text.js | 14 +++++++------- src/base/single/button/buttons/button.icon.js | 2 +- src/base/single/button/buttons/button.js | 10 +++++----- src/base/single/html/html.js | 14 +++++++------- src/base/single/label/abstract.label.js | 8 ++++---- src/base/single/label/icon.label.js | 2 +- src/base/single/tip/tip.toast.js | 4 ++-- src/base/single/tip/tip.tooltip.js | 2 +- src/case/list/list.select.js | 2 +- .../tree/treeexpander/tree.expander.popup.js | 4 ++-- src/core/4.widget.js | 4 ++-- src/core/constant/var.js | 19 ++++++++++++++++--- src/core/wrapper/layout.js | 10 +++++----- src/core/wrapper/layout/layout.flow.js | 8 ++++---- src/core/wrapper/layout/layout.inline.js | 8 ++++---- .../multilayerselecttree.popup.js | 2 +- .../multilayersingletree.popup.js | 2 +- .../multiselect/multiselect.loader.nobar.js | 2 +- src/widget/singleselect/singleselect.list.js | 2 +- 20 files changed, 74 insertions(+), 61 deletions(-) diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 1e768ae2c..88d11ac89 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -60,8 +60,8 @@ BI.PopupView = BI.inherit(BI.Widget, { } this.element.css({ "z-index": BI.zIndex_popup, - "min-width": BI.isNumeric(o.minWidth) ? (BI.pixFormat(o.minWidth)) : o.minWidth, - "max-width": BI.isNumeric(o.maxWidth) ? (BI.pixFormat(o.maxWidth)) : o.maxWidth, + "min-width": BI.toPix(o.minWidth), + "max-width": BI.toPix(o.maxWidth), }).bind({ click: fn }); this.element.bind("mousewheel", fn); @@ -135,11 +135,11 @@ BI.PopupView = BI.inherit(BI.Widget, { var o = this.options; this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value }); this.button_group.element.css({ - "min-height": BI.isNumeric(o.minHeight) ? (BI.pixFormat(o.minHeight)) : o.minHeight, - "padding-top": BI.pixFormat(o.innerVgap), - "padding-bottom": BI.pixFormat(o.innerVgap), - "padding-left": BI.pixFormat(o.innerHgap), - "padding-right": BI.pixFormat(o.innerHgap), + "min-height": BI.toPix(o.minHeight), + "padding-top": BI.toPix(o.innerVgap), + "padding-bottom": BI.toPix(o.innerVgap), + "padding-left": BI.toPix(o.innerHgap), + "padding-right": BI.toPix(o.innerHgap), }); return this.button_group; @@ -411,7 +411,7 @@ BI.PopupView = BI.inherit(BI.Widget, { toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVgap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : - this.view.element.css({ "max-height": BI.pixFormat(resetHeight) }); + this.view.element.css({ "max-height": BI.toPix(resetHeight) }); }, setValue: function (selectedValues) { diff --git a/src/base/single/1.text.js b/src/base/single/1.text.js index 9c4244a9d..03acbc948 100644 --- a/src/base/single/1.text.js +++ b/src/base/single/1.text.js @@ -26,32 +26,32 @@ var self = this, o = this.options; if (o.hgap + o.lgap > 0) { this.element.css({ - "padding-left": BI.pixFormat(o.hgap + o.lgap), + "padding-left": BI.toPix(o.hgap + o.lgap), }); } if (o.hgap + o.rgap > 0) { this.element.css({ - "padding-right": BI.pixFormat(o.hgap + o.rgap), + "padding-right": BI.toPix(o.hgap + o.rgap), }); } if (o.vgap + o.tgap > 0) { this.element.css({ - "padding-top": BI.pixFormat(o.vgap + o.tgap), + "padding-top": BI.toPix(o.vgap + o.tgap), }); } if (o.vgap + o.bgap > 0) { this.element.css({ - "padding-bottom": BI.pixFormat(o.vgap + o.bgap), + "padding-bottom": BI.toPix(o.vgap + o.bgap), }); } if (BI.isWidthOrHeight(o.height)) { - this.element.css({ lineHeight: BI.isNumber(o.height) ? BI.pixFormat(o.height) : o.height }); + this.element.css({ lineHeight: BI.toPix(o.height) }); } if (BI.isWidthOrHeight(o.lineHeight)) { - this.element.css({ lineHeight: BI.isNumber(o.lineHeight) ? BI.pixFormat(o.lineHeight) : o.lineHeight }); + this.element.css({ lineHeight: BI.toPix(o.lineHeight) }); } if (BI.isWidthOrHeight(o.maxWidth)) { - this.element.css({ maxWidth: BI.isNumber(o.maxWidth) ? BI.pixFormat(o.maxWidth) : o.maxWidth }); + this.element.css({ maxWidth: BI.toPix(o.maxWidth) }); } this.element.css({ textAlign: o.textAlign, diff --git a/src/base/single/button/buttons/button.icon.js b/src/base/single/button/buttons/button.icon.js index 045126c38..53cccf058 100644 --- a/src/base/single/button/buttons/button.icon.js +++ b/src/base/single/button/buttons/button.icon.js @@ -31,7 +31,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, { height: o.iconHeight, }); if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { - this.element.css("lineHeight", BI.pixFormat(o.height)); + this.element.css("lineHeight", BI.toPix(o.height)); BI.createWidget({ type: "bi.default", element: this, diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index a8da2e32b..ca0598ec4 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -98,8 +98,8 @@ type: "bi.icon_label", cls: o.loading ? loadingCls : (o.iconCls || o.icon), width: this._const.iconWidth, - height: BI.pixFormat(lineHeight, hasBorder ? 2 : 0), - lineHeight: BI.pixFormat(lineHeight, hasBorder ? 2 : 0), + height: BI.toPix(lineHeight, hasBorder ? 2 : 0), + lineHeight: BI.toPix(lineHeight, hasBorder ? 2 : 0), // 不设置,自定义按钮无法居中 iconWidth: o.iconWidth, iconHeight: o.iconHeight, @@ -120,8 +120,8 @@ whiteSpace: o.whiteSpace, textAlign: o.textAlign, textWidth: textWidth, - textHeight: BI.pixFormat(textHeight, hasBorder ? 2 : 0), - height: BI.pixFormat(lineHeight, hasBorder ? 2 : 0), + textHeight: BI.toPix(textHeight, hasBorder ? 2 : 0), + height: BI.toPix(lineHeight, hasBorder ? 2 : 0), value: o.value, title: null, }); @@ -163,7 +163,7 @@ }); if (o.minWidth > 0) { - this.element.css({ "min-width": BI.pixFormat(o.minWidth) }); + this.element.css({ "min-width": BI.toPix(o.minWidth) }); } }, diff --git a/src/base/single/html/html.js b/src/base/single/html/html.js index 84c980427..f6be1ff27 100644 --- a/src/base/single/html/html.js +++ b/src/base/single/html/html.js @@ -25,35 +25,35 @@ BI.Html = BI.inherit(BI.Single, { var self = this, o = this.options; if (o.hgap + o.lgap > 0) { this.element.css({ - "padding-left": BI.pixFormat(o.hgap + o.lgap), + "padding-left": BI.toPix(o.hgap + o.lgap), }); } if (o.hgap + o.rgap > 0) { this.element.css({ - "padding-right": BI.pixFormat(o.hgap + o.rgap), + "padding-right": BI.toPix(o.hgap + o.rgap), }); } if (o.vgap + o.tgap > 0) { this.element.css({ - "padding-top": BI.pixFormat(o.vgap + o.tgap), + "padding-top": BI.toPix(o.vgap + o.tgap), }); } if (o.vgap + o.bgap > 0) { this.element.css({ - "padding-bottom": BI.pixFormat(o.vgap + o.bgap), + "padding-bottom": BI.toPix(o.vgap + o.bgap), }); } if (BI.isNumber(o.height)) { - this.element.css({ lineHeight: BI.pixFormat(o.height) }); + this.element.css({ lineHeight: BI.toPix(o.height) }); } if (BI.isNumber(o.lineHeight)) { - this.element.css({ lineHeight: BI.pixFormat(o.lineHeight) }); + this.element.css({ lineHeight: BI.toPix(o.lineHeight) }); } if (BI.isWidthOrHeight(o.maxWidth)) { this.element.css({ maxWidth: o.maxWidth }); } if (BI.isNumber(o.maxWidth)) { - this.element.css({ maxWidth: BI.pixFormat(o.maxWidth) }) + this.element.css({ maxWidth: BI.toPix(o.maxWidth) }) } this.element.css({ textAlign: o.textAlign, diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index 19fc0322d..041be7a3e 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -109,7 +109,7 @@ } if (BI.isNumber(o.height) && o.height > 0) { // 1.4 this.element.css({ - "line-height": BI.pixFormat(o.height), + "line-height": BI.toPix(o.height), }); json.textAlign = o.textAlign; delete json.maxWidth; @@ -183,7 +183,7 @@ } if (BI.isNumber(o.height) && o.height > 0) { // 1.8 this.element.css({ - "line-height": BI.pixFormat(o.height), + "line-height": BI.toPix(o.height), }); json.textAlign = o.textAlign; delete json.maxWidth; @@ -263,7 +263,7 @@ if (BI.isNumber(o.height) && o.height > 0) { // 2.3 if (o.whiteSpace !== "normal") { this.element.css({ - "line-height": BI.pixFormat(o.height - (o.vgap * 2)), + "line-height": BI.toPix(o.height - (o.vgap * 2)), }); } delete json.maxWidth; @@ -325,7 +325,7 @@ if (BI.isNumber(o.height) && o.height > 0) { if (o.whiteSpace !== "normal") { this.element.css({ - "line-height": BI.pixFormat(o.height - (o.vgap * 2)), + "line-height": BI.toPix(o.height - (o.vgap * 2)), }); } delete json.maxWidth; diff --git a/src/base/single/label/icon.label.js b/src/base/single/label/icon.label.js index 53a400a05..e14b12685 100644 --- a/src/base/single/label/icon.label.js +++ b/src/base/single/label/icon.label.js @@ -29,7 +29,7 @@ BI.IconLabel = BI.inherit(BI.Single, { height: o.iconHeight, }); if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { - this.element.css("lineHeight", BI.pixFormat(o.lineHeight || o.height)); + this.element.css("lineHeight", BI.toPix(o.lineHeight || o.height)); BI.createWidget({ type: "bi.default", element: this, diff --git a/src/base/single/tip/tip.toast.js b/src/base/single/tip/tip.toast.js index 18af9e8e7..128eaa093 100644 --- a/src/base/single/tip/tip.toast.js +++ b/src/base/single/tip/tip.toast.js @@ -31,8 +31,8 @@ BI.Toast = BI.inherit(BI.Tip, { var self = this, o = this.options, c = this._const; this.element.css({ // 这里直接使用px即可 - minWidth: BI.pixFormat(o.closable ? c.closableMinWidth : c.minWidth), - maxWidth: BI.pixFormat(o.closable ? c.closableMaxWidth : c.maxWidth), + minWidth: BI.toPix(o.closable ? c.closableMinWidth : c.minWidth), + maxWidth: BI.toPix(o.closable ? c.closableMaxWidth : c.maxWidth), }); this.element.addClass("toast-" + o.level); function fn(e) { diff --git a/src/base/single/tip/tip.tooltip.js b/src/base/single/tip/tip.tooltip.js index aae6d8e86..28aeccf7a 100644 --- a/src/base/single/tip/tip.tooltip.js +++ b/src/base/single/tip/tip.tooltip.js @@ -73,7 +73,7 @@ BI.Tooltip = BI.inherit(BI.Tip, { }, setWidth: function (width) { - this.element.width(BI.pixFormat(width - 2 * this._const.hgap)); + this.element.width(BI.toPix(width - 2 * this._const.hgap)); }, setText: function (text) { diff --git a/src/case/list/list.select.js b/src/case/list/list.select.js index dfb3d7c1a..11e65ff92 100644 --- a/src/case/list/list.select.js +++ b/src/case/list/list.select.js @@ -192,7 +192,7 @@ BI.SelectList = BI.inherit(BI.Widget, { resetHeight: function (h) { var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0); this.list.resetHeight ? this.list.resetHeight(h - toolHeight) : - this.list.element.css({"max-height": BI.pixFormat(h - toolHeight)}); + this.list.element.css({"max-height": BI.toPix(h - toolHeight)}); }, setNotSelectedValue: function () { diff --git a/src/case/tree/treeexpander/tree.expander.popup.js b/src/case/tree/treeexpander/tree.expander.popup.js index ada979b0e..c8c22794e 100644 --- a/src/case/tree/treeexpander/tree.expander.popup.js +++ b/src/case/tree/treeexpander/tree.expander.popup.js @@ -25,8 +25,8 @@ }); if (o.showLine) { - this.popupView.element.css("margin-left", BI.pixFormat(-offset * (o.layer + 1))); - this.element.css("margin-left", BI.pixFormat(offset * (o.layer + 1))); + this.popupView.element.css("margin-left", BI.toPix(-offset * (o.layer + 1))); + this.element.css("margin-left", BI.toPix(offset * (o.layer + 1))); } return { diff --git a/src/core/4.widget.js b/src/core/4.widget.js index bca87b9fc..44617d076 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -289,14 +289,14 @@ _initElementWidth: function () { var o = this.options; if (BI.isWidthOrHeight(o.width)) { - this.element.css("width", BI.isNumber(o.width) ? BI.pixFormat(o.width) : o.width); + this.element.css("width", BI.toPix(o.width)); } }, _initElementHeight: function () { var o = this.options; if (BI.isWidthOrHeight(o.height)) { - this.element.css("height", BI.isNumber(o.height) ? BI.pixFormat(o.height) : o.height); + this.element.css("height", BI.toPix(o.height)); } }, diff --git a/src/core/constant/var.js b/src/core/constant/var.js index fc89511f5..f0a4e2db8 100644 --- a/src/core/constant/var.js +++ b/src/core/constant/var.js @@ -15,12 +15,13 @@ BI._.extend(BI, { emptyStr: "", pixUnit: "px", pixRatio: 1, - pixFormat: function (pix, border) { + // 一定返回最终的单位 + toPix: function (pix, border) { if (!BI.isNumber(pix)) { return pix; } - if (BI.pixUnit === "px" && BI.pixRatio === 1) { - return (pix - (border || 0)) / BI.pixRatio + BI.pixUnit; + if (BI.pixUnit === "px") { + return (pix / BI.pixRatio - (border || 0)) + BI.pixUnit; } var length = pix / BI.pixRatio + BI.pixUnit; if (border > 0) { @@ -28,6 +29,18 @@ BI._.extend(BI, { } return length; }, + pixFormat: 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 () { }, empty: null, diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index b1ae46ba7..6b574d537 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -42,16 +42,16 @@ BI.Layout = BI.inherit(BI.Widget, { _init4Margin: function () { 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.toPix(this.options.top)); } 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.toPix(this.options.left)); } 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.toPix(this.options.bottom)); } 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.toPix(this.options.right)); } }, @@ -289,7 +289,7 @@ BI.Layout = BI.inherit(BI.Widget, { }, _optimiseGap: function (gap) { - return (gap > 0 && gap < 1) ? (gap * 100).toFixed(1) + "%" : BI.pixFormat(gap); + return (gap > 0 && gap < 1) ? (gap * 100).toFixed(1) + "%" : BI.toPix(gap); }, _optimiseItemLgap: function (item) { diff --git a/src/core/wrapper/layout/layout.flow.js b/src/core/wrapper/layout/layout.flow.js index de14999f7..6443b7840 100644 --- a/src/core/wrapper/layout/layout.flow.js +++ b/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); w.element.css({position: "relative", float: "right"}); if (BI.isNotNull(item.left)) { - w.element.css({left: BI.isNumber(item.left) ? BI.pixFormat(item.left) : item.left}); + w.element.css({left: BI.toPix(item.left)}); } if (BI.isNotNull(item.right)) { - w.element.css({right: BI.isNumber(item.right) ? BI.pixFormat(item.right) : item.right}); + w.element.css({right: BI.toPix(item.right)}); } if (BI.isNotNull(item.top)) { - w.element.css({top: BI.isNumber(item.top) ? BI.pixFormat(item.top) : item.top}); + w.element.css({top: BI.toPix(item.top)}); } if (BI.isNotNull(item.bottom)) { - w.element.css({bottom: BI.isNumber(item.bottom) ? BI.pixFormat(item.bottom) : item.bottom}); + w.element.css({bottom: BI.toPix(item.bottom)}); } 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); diff --git a/src/core/wrapper/layout/layout.inline.js b/src/core/wrapper/layout/layout.inline.js index 661a6bf77..f3b0e2f22 100644 --- a/src/core/wrapper/layout/layout.inline.js +++ b/src/core/wrapper/layout/layout.inline.js @@ -47,7 +47,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, { } } if (columnSize > 0) { - w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : BI.pixFormat(columnSize)); + w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : BI.toPix(columnSize)); } w.element.css({ position: "relative", @@ -69,8 +69,8 @@ BI.InlineLayout = BI.inherit(BI.Layout, { gap += o.hgap + o.lgap + o.rgap + this._optimiseItemLgap(o.items[k]) + this._optimiseItemRgap(o.items[k]) + this._optimiseItemHgap(o.items[k]); length += cz; } - length = length > 0 && length < 1 ? (length * 100).toFixed(1) + "%" : BI.pixFormat(length); - gap = gap > 0 && gap < 1 ? (gap * 100).toFixed(1) + "%" : BI.pixFormat(gap); + length = length > 0 && length < 1 ? (length * 100).toFixed(1) + "%" : BI.toPix(length); + gap = gap > 0 && gap < 1 ? (gap * 100).toFixed(1) + "%" : BI.toPix(gap); if (columnSize === "fill") { w.element.css("min-width", "calc((100% - " + length + " - " + gap + ")" + (fillCount > 1 ? "/" + fillCount : "") + ")"); } @@ -86,7 +86,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, { if (o.verticalAlign === BI.VerticalAlign.Stretch && BI.isNull(item.height)) { var top = o.innerVgap + o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item), bottom = o.innerVgap + o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item); - var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : BI.pixFormat(top + bottom); + var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : BI.toPix(top + bottom); w.element.css("height", "calc(100% - " + gap + ")"); } return w; diff --git a/src/widget/multilayerselecttree/multilayerselecttree.popup.js b/src/widget/multilayerselecttree/multilayerselecttree.popup.js index 34dce3a58..fbe175af0 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.popup.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.popup.js @@ -56,7 +56,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, { self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE); }); - this.tree.css("min-height", BI.pixFormat(o.minHeight - 10)); + this.tree.css("min-height", BI.toPix(o.minHeight - 10)); }, getValue: function () { diff --git a/src/widget/multilayersingletree/multilayersingletree.popup.js b/src/widget/multilayersingletree/multilayersingletree.popup.js index 630c38237..666bdeb88 100644 --- a/src/widget/multilayersingletree/multilayersingletree.popup.js +++ b/src/widget/multilayersingletree/multilayersingletree.popup.js @@ -55,7 +55,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, { self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE); }); - this.tree.css("min-height", BI.pixFormat(o.minHeight - 10)); + this.tree.css("min-height", BI.toPix(o.minHeight - 10)); }, getValue: function () { diff --git a/src/widget/multiselect/multiselect.loader.nobar.js b/src/widget/multiselect/multiselect.loader.nobar.js index c8e259cd3..dde974df8 100644 --- a/src/widget/multiselect/multiselect.loader.nobar.js +++ b/src/widget/multiselect/multiselect.loader.nobar.js @@ -173,7 +173,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, { }, 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 () { diff --git a/src/widget/singleselect/singleselect.list.js b/src/widget/singleselect/singleselect.list.js index 9842eb3ea..e60ea267a 100644 --- a/src/widget/singleselect/singleselect.list.js +++ b/src/widget/singleselect/singleselect.list.js @@ -120,7 +120,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, { resetHeight: function (h) { this.list.resetHeight ? this.list.resetHeight(h) : - this.list.element.css({"max-height": BI.pixFormat(h - (this.options.allowNoSelect ? this._constants.itemHeight : 0))}); + this.list.element.css({"max-height": BI.toPix(h - (this.options.allowNoSelect ? this._constants.itemHeight : 0))}); }, setNotSelectedValue: function () { From 501657c9cfe83d8470a6eae5aeafee2334ccfb27 Mon Sep 17 00:00:00 2001 From: data Date: Sat, 22 Oct 2022 18:34:38 +0800 Subject: [PATCH 08/21] auto upgrade version to 2.0.20221022183431 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b468a5c37..be2ef018d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221022172437", + "version": "2.0.20221022183431", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From d0273e0849e22e1e62b4f6cdc77cd5de03304956 Mon Sep 17 00:00:00 2001 From: data Date: Sat, 22 Oct 2022 20:24:42 +0800 Subject: [PATCH 09/21] auto upgrade version to 2.0.20221022202435 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be2ef018d..20d118ed6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221022183431", + "version": "2.0.20221022202435", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 95ec11b82453f9e8a6d73858cce85012a140fce1 Mon Sep 17 00:00:00 2001 From: zsmj Date: Sat, 22 Oct 2022 21:11:19 +0800 Subject: [PATCH 10/21] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=5FinitElementHeig?= =?UTF-8?q?ht=E5=92=8C=5FinitElementWidth=E6=96=B9=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 1873e0b44..8be3a9058 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -289,14 +289,14 @@ _initElementWidth: function () { var o = this.options; if (BI.isWidthOrHeight(o.width)) { - this.element.css("width", BI.toPix(o.width)); + this.element.css("width", BI.isNumber(o.width) ? BI.pixFormat(o.width) : o.width); } }, _initElementHeight: function () { var o = this.options; if (BI.isWidthOrHeight(o.height)) { - this.element.css("height", BI.toPix(o.height)); + this.element.css("height", BI.isNumber(o.height) ? BI.pixFormat(o.height) : o.height); } }, From b7e9838417994e2e54d5b86c47628fff54bfd3b8 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Oct 2022 21:49:43 +0800 Subject: [PATCH 11/21] =?UTF-8?q?toPix=20=E5=92=8C=20pixFormat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/useContext.html | 2 ++ src/base/layer/layer.popup.js | 16 ++++++++-------- src/base/single/1.text.js | 14 +++++++------- src/base/single/button/buttons/button.icon.js | 2 +- src/base/single/button/buttons/button.js | 2 +- src/base/single/html/html.js | 14 +++++++------- src/base/single/label/abstract.label.js | 8 ++++---- src/base/single/label/icon.label.js | 2 +- src/base/single/tip/tip.toast.js | 5 ++--- src/base/single/tip/tip.tooltip.js | 2 +- src/case/colorchooser/colorchooser.js | 4 ++-- .../icontextvaluecombo/combo.icontextvalue.js | 6 +++--- .../combo.searchtextvalue.js | 6 +++--- .../combo.textvaluecheck.js | 6 +++--- .../combo/textvaluecombo/combo.textvalue.js | 6 +++--- src/case/layer/panel.js | 4 ++-- .../linearsegment/button.linear.segment.js | 2 +- src/case/list/list.select.js | 2 +- src/case/segment/segment.js | 2 +- .../tree/treeexpander/tree.expander.popup.js | 4 ++-- src/case/trigger/trigger.editor.js | 6 +++--- src/case/trigger/trigger.text.select.small.js | 2 +- src/core/4.widget.js | 4 ++-- src/core/wrapper/layout.js | 10 +++++----- src/core/wrapper/layout/layout.flow.js | 8 ++++---- src/core/wrapper/layout/layout.inline.js | 8 ++++---- src/widget/date/calendar/popup.month.js | 2 +- src/widget/dynamicdate/dynamicdate.combo.js | 10 +++++----- .../dynamicdate/dynamicdate.param.item.js | 2 +- src/widget/dynamicdate/dynamicdate.popup.js | 6 +++--- .../dynamicdatetime/dynamicdatetime.combo.js | 6 +++--- .../dynamicdatetime/dynamicdatetime.popup.js | 6 +++--- src/widget/editor/editor.search.js | 4 ++-- src/widget/editor/editor.text.js | 4 ++-- src/widget/intervalslider/intervalslider.js | 8 ++++---- .../multilayerselecttree.combo.js | 16 ++++++++-------- .../multilayerselecttree.popup.js | 2 +- .../multilayersingletree.combo.js | 12 ++++++------ .../multilayersingletree.popup.js | 2 +- src/widget/multiselect/multiselect.combo.js | 2 +- .../multiselect/multiselect.combo.nobar.js | 2 +- .../multiselect/multiselect.insert.combo.js | 2 +- .../multiselect.insert.combo.nobar.js | 2 +- src/widget/multitree/multi.tree.combo.js | 2 +- .../multitree/multi.tree.insert.combo.js | 2 +- src/widget/multitree/multi.tree.list.combo.js | 2 +- src/widget/numbereditor/number.editor.js | 4 ++-- src/widget/numberinterval/numberinterval.js | 18 +++++++++--------- .../multitextvalue.combo.search.js | 2 +- src/widget/selecttree/selecttree.combo.js | 6 +++--- src/widget/singleselect/singleselect.combo.js | 2 +- .../singleselect/singleselect.insert.combo.js | 2 +- src/widget/singleselect/singleselect.list.js | 2 +- src/widget/singleslider/singleslider.js | 4 ++-- src/widget/singleslider/singleslider.label.js | 2 +- src/widget/singletree/singletree.combo.js | 6 +++--- .../combo.textvaluedownlist.js | 6 +++--- src/widget/time/time.combo.js | 4 ++-- src/widget/year/combo.year.js | 4 ++-- src/widget/year/popup.year.js | 6 +++--- src/widget/yearmonth/card.static.yearmonth.js | 2 +- src/widget/yearmonth/combo.yearmonth.js | 6 +++--- src/widget/yearmonth/popup.yearmonth.js | 6 +++--- src/widget/yearquarter/combo.yearquarter.js | 4 ++-- src/widget/yearquarter/popup.yearquarter.js | 6 +++--- 65 files changed, 167 insertions(+), 166 deletions(-) diff --git a/examples/useContext.html b/examples/useContext.html index 00bc3a455..723152250 100644 --- a/examples/useContext.html +++ b/examples/useContext.html @@ -56,6 +56,8 @@ return "calc(var(--css-scale) * " + pix + "px)"; }; + BI.toPix = BI.pixFormat; + var Child = BI.inherit(BI.Widget, { render: function () { var label; diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 88d11ac89..dbeb7e8fe 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -60,8 +60,8 @@ BI.PopupView = BI.inherit(BI.Widget, { } this.element.css({ "z-index": BI.zIndex_popup, - "min-width": BI.toPix(o.minWidth), - "max-width": BI.toPix(o.maxWidth), + "min-width": BI.pixFormat(o.minWidth), + "max-width": BI.pixFormat(o.maxWidth), }).bind({ click: fn }); this.element.bind("mousewheel", fn); @@ -135,11 +135,11 @@ BI.PopupView = BI.inherit(BI.Widget, { var o = this.options; this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value }); this.button_group.element.css({ - "min-height": BI.toPix(o.minHeight), - "padding-top": BI.toPix(o.innerVgap), - "padding-bottom": BI.toPix(o.innerVgap), - "padding-left": BI.toPix(o.innerHgap), - "padding-right": BI.toPix(o.innerHgap), + "min-height": BI.pixFormat(o.minHeight), + "padding-top": BI.pixFormat(o.innerVgap), + "padding-bottom": BI.pixFormat(o.innerVgap), + "padding-left": BI.pixFormat(o.innerHgap), + "padding-right": BI.pixFormat(o.innerHgap), }); return this.button_group; @@ -411,7 +411,7 @@ BI.PopupView = BI.inherit(BI.Widget, { toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVgap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : - this.view.element.css({ "max-height": BI.toPix(resetHeight) }); + this.view.element.css({ "max-height": BI.pixFormat(resetHeight) }); }, setValue: function (selectedValues) { diff --git a/src/base/single/1.text.js b/src/base/single/1.text.js index 03acbc948..f31ebfe43 100644 --- a/src/base/single/1.text.js +++ b/src/base/single/1.text.js @@ -26,32 +26,32 @@ var self = this, o = this.options; if (o.hgap + o.lgap > 0) { this.element.css({ - "padding-left": BI.toPix(o.hgap + o.lgap), + "padding-left": BI.pixFormat(o.hgap + o.lgap), }); } if (o.hgap + o.rgap > 0) { this.element.css({ - "padding-right": BI.toPix(o.hgap + o.rgap), + "padding-right": BI.pixFormat(o.hgap + o.rgap), }); } if (o.vgap + o.tgap > 0) { this.element.css({ - "padding-top": BI.toPix(o.vgap + o.tgap), + "padding-top": BI.pixFormat(o.vgap + o.tgap), }); } if (o.vgap + o.bgap > 0) { this.element.css({ - "padding-bottom": BI.toPix(o.vgap + o.bgap), + "padding-bottom": BI.pixFormat(o.vgap + o.bgap), }); } if (BI.isWidthOrHeight(o.height)) { - this.element.css({ lineHeight: BI.toPix(o.height) }); + this.element.css({ lineHeight: BI.pixFormat(o.height) }); } if (BI.isWidthOrHeight(o.lineHeight)) { - this.element.css({ lineHeight: BI.toPix(o.lineHeight) }); + this.element.css({ lineHeight: BI.pixFormat(o.lineHeight) }); } if (BI.isWidthOrHeight(o.maxWidth)) { - this.element.css({ maxWidth: BI.toPix(o.maxWidth) }); + this.element.css({ maxWidth: BI.pixFormat(o.maxWidth) }); } this.element.css({ textAlign: o.textAlign, diff --git a/src/base/single/button/buttons/button.icon.js b/src/base/single/button/buttons/button.icon.js index 53cccf058..045126c38 100644 --- a/src/base/single/button/buttons/button.icon.js +++ b/src/base/single/button/buttons/button.icon.js @@ -31,7 +31,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, { height: o.iconHeight, }); if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { - this.element.css("lineHeight", BI.toPix(o.height)); + this.element.css("lineHeight", BI.pixFormat(o.height)); BI.createWidget({ type: "bi.default", element: this, diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index ca0598ec4..39cfffda3 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -163,7 +163,7 @@ }); if (o.minWidth > 0) { - this.element.css({ "min-width": BI.toPix(o.minWidth) }); + this.element.css({ "min-width": BI.pixFormat(o.minWidth) }); } }, diff --git a/src/base/single/html/html.js b/src/base/single/html/html.js index f6be1ff27..84c980427 100644 --- a/src/base/single/html/html.js +++ b/src/base/single/html/html.js @@ -25,35 +25,35 @@ BI.Html = BI.inherit(BI.Single, { var self = this, o = this.options; if (o.hgap + o.lgap > 0) { this.element.css({ - "padding-left": BI.toPix(o.hgap + o.lgap), + "padding-left": BI.pixFormat(o.hgap + o.lgap), }); } if (o.hgap + o.rgap > 0) { this.element.css({ - "padding-right": BI.toPix(o.hgap + o.rgap), + "padding-right": BI.pixFormat(o.hgap + o.rgap), }); } if (o.vgap + o.tgap > 0) { this.element.css({ - "padding-top": BI.toPix(o.vgap + o.tgap), + "padding-top": BI.pixFormat(o.vgap + o.tgap), }); } if (o.vgap + o.bgap > 0) { this.element.css({ - "padding-bottom": BI.toPix(o.vgap + o.bgap), + "padding-bottom": BI.pixFormat(o.vgap + o.bgap), }); } if (BI.isNumber(o.height)) { - this.element.css({ lineHeight: BI.toPix(o.height) }); + this.element.css({ lineHeight: BI.pixFormat(o.height) }); } if (BI.isNumber(o.lineHeight)) { - this.element.css({ lineHeight: BI.toPix(o.lineHeight) }); + this.element.css({ lineHeight: BI.pixFormat(o.lineHeight) }); } if (BI.isWidthOrHeight(o.maxWidth)) { this.element.css({ maxWidth: o.maxWidth }); } if (BI.isNumber(o.maxWidth)) { - this.element.css({ maxWidth: BI.toPix(o.maxWidth) }) + this.element.css({ maxWidth: BI.pixFormat(o.maxWidth) }) } this.element.css({ textAlign: o.textAlign, diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index 041be7a3e..19fc0322d 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -109,7 +109,7 @@ } if (BI.isNumber(o.height) && o.height > 0) { // 1.4 this.element.css({ - "line-height": BI.toPix(o.height), + "line-height": BI.pixFormat(o.height), }); json.textAlign = o.textAlign; delete json.maxWidth; @@ -183,7 +183,7 @@ } if (BI.isNumber(o.height) && o.height > 0) { // 1.8 this.element.css({ - "line-height": BI.toPix(o.height), + "line-height": BI.pixFormat(o.height), }); json.textAlign = o.textAlign; delete json.maxWidth; @@ -263,7 +263,7 @@ if (BI.isNumber(o.height) && o.height > 0) { // 2.3 if (o.whiteSpace !== "normal") { this.element.css({ - "line-height": BI.toPix(o.height - (o.vgap * 2)), + "line-height": BI.pixFormat(o.height - (o.vgap * 2)), }); } delete json.maxWidth; @@ -325,7 +325,7 @@ if (BI.isNumber(o.height) && o.height > 0) { if (o.whiteSpace !== "normal") { this.element.css({ - "line-height": BI.toPix(o.height - (o.vgap * 2)), + "line-height": BI.pixFormat(o.height - (o.vgap * 2)), }); } delete json.maxWidth; diff --git a/src/base/single/label/icon.label.js b/src/base/single/label/icon.label.js index e14b12685..53a400a05 100644 --- a/src/base/single/label/icon.label.js +++ b/src/base/single/label/icon.label.js @@ -29,7 +29,7 @@ BI.IconLabel = BI.inherit(BI.Single, { height: o.iconHeight, }); if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) { - this.element.css("lineHeight", BI.toPix(o.lineHeight || o.height)); + this.element.css("lineHeight", BI.pixFormat(o.lineHeight || o.height)); BI.createWidget({ type: "bi.default", element: this, diff --git a/src/base/single/tip/tip.toast.js b/src/base/single/tip/tip.toast.js index 128eaa093..e347ae062 100644 --- a/src/base/single/tip/tip.toast.js +++ b/src/base/single/tip/tip.toast.js @@ -30,9 +30,8 @@ BI.Toast = BI.inherit(BI.Tip, { render: function () { var self = this, o = this.options, c = this._const; this.element.css({ - // 这里直接使用px即可 - minWidth: BI.toPix(o.closable ? c.closableMinWidth : c.minWidth), - maxWidth: BI.toPix(o.closable ? c.closableMaxWidth : c.maxWidth), + minWidth: BI.pixFormat(o.closable ? c.closableMinWidth : c.minWidth), + maxWidth: BI.pixFormat(o.closable ? c.closableMaxWidth : c.maxWidth), }); this.element.addClass("toast-" + o.level); function fn(e) { diff --git a/src/base/single/tip/tip.tooltip.js b/src/base/single/tip/tip.tooltip.js index 28aeccf7a..aae6d8e86 100644 --- a/src/base/single/tip/tip.tooltip.js +++ b/src/base/single/tip/tip.tooltip.js @@ -73,7 +73,7 @@ BI.Tooltip = BI.inherit(BI.Tip, { }, setWidth: function (width) { - this.element.width(BI.toPix(width - 2 * this._const.hgap)); + this.element.width(BI.pixFormat(width - 2 * this._const.hgap)); }, setText: function (text) { diff --git a/src/case/colorchooser/colorchooser.js b/src/case/colorchooser/colorchooser.js index e60ee42f9..218ea56b0 100644 --- a/src/case/colorchooser/colorchooser.js +++ b/src/case/colorchooser/colorchooser.js @@ -36,8 +36,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, { self.trigger = _ref; }, value: o.value, - width: o.el.type ? o.width : BI.pixFormat(o.width, 2), - height: o.el.type ? o.height : BI.pixFormat(o.height, 2) + width: o.el.type ? o.width : BI.toPix(o.width, 2), + height: o.el.type ? o.height : BI.toPix(o.height, 2) }, o.el), popup: () => ({ el: BI.extend({ diff --git a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js index 704c80f14..9a920240a 100644 --- a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js +++ b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js @@ -26,7 +26,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, { type: "bi.select_icon_text_trigger", cls: "icon-text-value-trigger", items: o.items, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), text: o.text, iconCls: o.iconCls, value: o.value, @@ -54,8 +54,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, { }); this.textIconCombo = BI.createWidget({ type: "bi.combo", - height: BI.pixFormat(o.height, 2), - width: BI.pixFormat(o.width, 2), + height: BI.toPix(o.height, 2), + width: BI.toPix(o.width, 2), element: this, container: o.container, direction: o.direction, diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index d394a6017..63f73944a 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/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", container: o.container, adjustLength: 2, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), - width: BI.pixFormat(o.width, 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), + width: BI.toPix(o.width, 2), ref: function () { self.combo = this; }, @@ -41,7 +41,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { self.trigger = this; }, items: o.items, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), text: o.text, defaultText: o.defaultText, value: o.value, diff --git a/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js b/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js index 12c300f22..9c5f0d0fc 100644 --- a/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js +++ b/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js @@ -27,7 +27,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, { type: "bi.select_text_trigger", cls: "text-value-trigger", items: o.items, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), text: o.text, value: o.value }); @@ -50,8 +50,8 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, { container: o.container, direction: o.direction, element: this, - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), adjustLength: 2, el: this.trigger, popup: { diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 78cb6fc24..1128f4ed8 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -55,7 +55,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { ref: ref => this.trigger = ref, cls: "text-value-trigger", items: o.items, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), text: o.text, value: o.value, title, @@ -116,8 +116,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { return { type: "bi.combo", - height: BI.pixFormat(o.height, 2), - width: BI.pixFormat(o.width, 2), + height: BI.toPix(o.height, 2), + width: BI.toPix(o.width, 2), ref: ref => this.combo = ref, container: o.container, direction: o.direction, diff --git a/src/case/layer/panel.js b/src/case/layer/panel.js index 45f5cbf79..5c41e35d9 100644 --- a/src/case/layer/panel.js +++ b/src/case/layer/panel.js @@ -59,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: BI.pixFormat(o.titleHeight, 1), + height: BI.toPix(o.titleHeight, 1), items: { left: [this.text], right: [this.button_group] @@ -67,7 +67,7 @@ BI.Panel = BI.inherit(BI.Widget, { lhgap: 10, rhgap: 10 }, - height: BI.pixFormat(o.titleHeight, 1) + height: BI.toPix(o.titleHeight, 1) }; }, diff --git a/src/case/linearsegment/button.linear.segment.js b/src/case/linearsegment/button.linear.segment.js index d6c5abe5d..c9954925c 100644 --- a/src/case/linearsegment/button.linear.segment.js +++ b/src/case/linearsegment/button.linear.segment.js @@ -15,7 +15,7 @@ BI.LinearSegmentButton = BI.inherit(BI.BasicButton, { type: "bi.label", text: o.text, height: o.height, - textHeight: BI.pixFormat(o.height, 2), + textHeight: BI.toPix(o.height, 2), value: o.value, hgap: o.hgap, ref: function () { diff --git a/src/case/list/list.select.js b/src/case/list/list.select.js index 11e65ff92..dfb3d7c1a 100644 --- a/src/case/list/list.select.js +++ b/src/case/list/list.select.js @@ -192,7 +192,7 @@ BI.SelectList = BI.inherit(BI.Widget, { resetHeight: function (h) { var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0); this.list.resetHeight ? this.list.resetHeight(h - toolHeight) : - this.list.element.css({"max-height": BI.toPix(h - toolHeight)}); + this.list.element.css({"max-height": BI.pixFormat(h - toolHeight)}); }, setNotSelectedValue: function () { diff --git a/src/case/segment/segment.js b/src/case/segment/segment.js index 55d8d18db..dac7754d1 100644 --- a/src/case/segment/segment.js +++ b/src/case/segment/segment.js @@ -22,7 +22,7 @@ BI.Segment = BI.inherit(BI.Widget, { value: o.value, items: BI.createItems(o.items, { type: "bi.segment_button", - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), whiteSpace: o.whiteSpace }), layout: [ diff --git a/src/case/tree/treeexpander/tree.expander.popup.js b/src/case/tree/treeexpander/tree.expander.popup.js index c8c22794e..ada979b0e 100644 --- a/src/case/tree/treeexpander/tree.expander.popup.js +++ b/src/case/tree/treeexpander/tree.expander.popup.js @@ -25,8 +25,8 @@ }); if (o.showLine) { - this.popupView.element.css("margin-left", BI.toPix(-offset * (o.layer + 1))); - this.element.css("margin-left", BI.toPix(offset * (o.layer + 1))); + this.popupView.element.css("margin-left", BI.pixFormat(-offset * (o.layer + 1))); + this.element.css("margin-left", BI.pixFormat(offset * (o.layer + 1))); } return { diff --git a/src/case/trigger/trigger.editor.js b/src/case/trigger/trigger.editor.js index 7b2c39e3c..5bdcc8f56 100644 --- a/src/case/trigger/trigger.editor.js +++ b/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; this.editor = BI.createWidget({ type: "bi.sign_editor", - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), value: o.value, validationChecker: o.validationChecker, quitChecker: o.quitChecker, @@ -57,7 +57,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, { BI.createWidget({ element: this, type: "bi.horizontal_fill", - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), items: [ { el: this.editor, @@ -65,7 +65,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, { }, { el: { type: "bi.trigger_icon_button", - width: o.triggerWidth || BI.pixFormat(o.height, 2) + width: o.triggerWidth || BI.toPix(o.height, 2) }, width: "" } diff --git a/src/case/trigger/trigger.text.select.small.js b/src/case/trigger/trigger.text.select.small.js index 8e81a7ac7..adbd5603c 100644 --- a/src/case/trigger/trigger.text.select.small.js +++ b/src/case/trigger/trigger.text.select.small.js @@ -20,7 +20,7 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, { this.trigger = BI.createWidget({ type: "bi.small_text_trigger", element: this, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), text: obj.text, cls: obj.cls, textHgap: o.textHgap, diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 44617d076..f9e27d296 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -289,14 +289,14 @@ _initElementWidth: function () { var o = this.options; if (BI.isWidthOrHeight(o.width)) { - this.element.css("width", BI.toPix(o.width)); + this.element.css("width", BI.pixFormat(o.width)); } }, _initElementHeight: function () { var o = this.options; if (BI.isWidthOrHeight(o.height)) { - this.element.css("height", BI.toPix(o.height)); + this.element.css("height", BI.pixFormat(o.height)); } }, diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index 6b574d537..8ca284d30 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -42,16 +42,16 @@ BI.Layout = BI.inherit(BI.Widget, { _init4Margin: function () { if (this.options.top) { - this.element.css("top", BI.toPix(this.options.top)); + this.element.css("top", BI.pixFormat(this.options.top)); } if (this.options.left) { - this.element.css("left", BI.toPix(this.options.left)); + this.element.css("left", BI.pixFormat(this.options.left)); } if (this.options.bottom) { - this.element.css("bottom", BI.toPix(this.options.bottom)); + this.element.css("bottom", BI.pixFormat(this.options.bottom)); } if (this.options.right) { - this.element.css("right", BI.toPix(this.options.right)); + this.element.css("right", BI.pixFormat(this.options.right)); } }, @@ -289,7 +289,7 @@ BI.Layout = BI.inherit(BI.Widget, { }, _optimiseGap: function (gap) { - return (gap > 0 && gap < 1) ? (gap * 100).toFixed(1) + "%" : BI.toPix(gap); + return (gap > 0 && gap < 1) ? (gap * 100).toFixed(1) + "%" : BI.pixFormat(gap); }, _optimiseItemLgap: function (item) { diff --git a/src/core/wrapper/layout/layout.flow.js b/src/core/wrapper/layout/layout.flow.js index 6443b7840..13b9fdb54 100644 --- a/src/core/wrapper/layout/layout.flow.js +++ b/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); w.element.css({position: "relative", float: "right"}); if (BI.isNotNull(item.left)) { - w.element.css({left: BI.toPix(item.left)}); + w.element.css({left: BI.pixFormat(item.left)}); } if (BI.isNotNull(item.right)) { - w.element.css({right: BI.toPix(item.right)}); + w.element.css({right: BI.pixFormat(item.right)}); } if (BI.isNotNull(item.top)) { - w.element.css({top: BI.toPix(item.top)}); + w.element.css({top: BI.pixFormat(item.top)}); } if (BI.isNotNull(item.bottom)) { - w.element.css({bottom: BI.toPix(item.bottom)}); + w.element.css({bottom: BI.pixFormat(item.bottom)}); } 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); diff --git a/src/core/wrapper/layout/layout.inline.js b/src/core/wrapper/layout/layout.inline.js index f3b0e2f22..661a6bf77 100644 --- a/src/core/wrapper/layout/layout.inline.js +++ b/src/core/wrapper/layout/layout.inline.js @@ -47,7 +47,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, { } } if (columnSize > 0) { - w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : BI.toPix(columnSize)); + w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : BI.pixFormat(columnSize)); } w.element.css({ position: "relative", @@ -69,8 +69,8 @@ BI.InlineLayout = BI.inherit(BI.Layout, { gap += o.hgap + o.lgap + o.rgap + this._optimiseItemLgap(o.items[k]) + this._optimiseItemRgap(o.items[k]) + this._optimiseItemHgap(o.items[k]); length += cz; } - length = length > 0 && length < 1 ? (length * 100).toFixed(1) + "%" : BI.toPix(length); - gap = gap > 0 && gap < 1 ? (gap * 100).toFixed(1) + "%" : BI.toPix(gap); + length = length > 0 && length < 1 ? (length * 100).toFixed(1) + "%" : BI.pixFormat(length); + gap = gap > 0 && gap < 1 ? (gap * 100).toFixed(1) + "%" : BI.pixFormat(gap); if (columnSize === "fill") { w.element.css("min-width", "calc((100% - " + length + " - " + gap + ")" + (fillCount > 1 ? "/" + fillCount : "") + ")"); } @@ -86,7 +86,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, { if (o.verticalAlign === BI.VerticalAlign.Stretch && BI.isNull(item.height)) { var top = o.innerVgap + o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item), bottom = o.innerVgap + o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item); - var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : BI.toPix(top + bottom); + var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : BI.pixFormat(top + bottom); w.element.css("height", "calc(100% - " + gap + ")"); } return w; diff --git a/src/widget/date/calendar/popup.month.js b/src/widget/date/calendar/popup.month.js index 911f578a1..402c6ffc2 100644 --- a/src/widget/date/calendar/popup.month.js +++ b/src/widget/date/calendar/popup.month.js @@ -68,7 +68,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, { whiteSpace: "nowrap", once: false, forceSelected: true, - height: BI.pixFormat(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1), + height: BI.toPix(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1), width: 30, value: td, text: td, diff --git a/src/widget/dynamicdate/dynamicdate.combo.js b/src/widget/dynamicdate/dynamicdate.combo.js index 4508f8e50..3219fb298 100644 --- a/src/widget/dynamicdate/dynamicdate.combo.js +++ b/src/widget/dynamicdate/dynamicdate.combo.js @@ -50,13 +50,13 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, { el: { type: "bi.horizontal_fill", columnSize: [this.constants.iconWidth, "fill"], - height: BI.pixFormat(opts.height, border), + height: BI.toPix(opts.height, border), items: [{ el: { type: "bi.icon_button", cls: "bi-trigger-icon-button date-change-h-font", - width: BI.pixFormat(opts.height, border), - height: BI.pixFormat(opts.height, border), + width: BI.toPix(opts.height, border), + height: BI.toPix(opts.height, border), ref: function () { self.changeIcon = this; } @@ -69,8 +69,8 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, { format: opts.format, allowEdit: opts.allowEdit, watermark: opts.watermark, - iconWidth: BI.pixFormat(opts.height, border), - height: BI.pixFormat(opts.height, border), + iconWidth: BI.toPix(opts.height, border), + height: BI.toPix(opts.height, border), value: opts.value, ref: function () { self.trigger = this; diff --git a/src/widget/dynamicdate/dynamicdate.param.item.js b/src/widget/dynamicdate/dynamicdate.param.item.js index 26c1ad101..ed8c4dea0 100644 --- a/src/widget/dynamicdate/dynamicdate.param.item.js +++ b/src/widget/dynamicdate/dynamicdate.param.item.js @@ -21,7 +21,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, { el: { type: "bi.sign_editor", 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) { return BI.isNaturalNumber(v); }, diff --git a/src/widget/dynamicdate/dynamicdate.popup.js b/src/widget/dynamicdate/dynamicdate.popup.js index 843980eda..1f0967e58 100644 --- a/src/widget/dynamicdate/dynamicdate.popup.js +++ b/src/widget/dynamicdate/dynamicdate.popup.js @@ -26,7 +26,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { cls: "bi-high-light bi-split-top", shadow: true, 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: [{ eventName: BI.TextButton.EVENT_CHANGE, action: function () { @@ -37,7 +37,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "bi-split-left bi-split-right bi-high-light bi-split-top", 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"), disabled: this._checkTodayValid(), ref: function () { @@ -52,7 +52,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_OK"), listeners: [{ diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js index 5077d7866..ffb4b6429 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -50,13 +50,13 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { el: { type: "bi.horizontal_fill", columnSize: [this.constants.iconWidth, "fill"], - height: BI.pixFormat(opts.height, border), + height: BI.toPix(opts.height, border), items: [{ el: { type: "bi.icon_button", cls: "bi-trigger-icon-button date-change-h-font", width: this.constants.iconWidth, - height: BI.pixFormat(opts.height, border), + height: BI.toPix(opts.height, border), ref: function () { self.changeIcon = this; } @@ -70,7 +70,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { watermark: opts.watermark, format: opts.format, iconWidth: this.constants.iconWidth, - height: BI.pixFormat(opts.height, border), + height: BI.toPix(opts.height, border), value: opts.value, ref: function () { self.trigger = this; diff --git a/src/widget/dynamicdatetime/dynamicdatetime.popup.js b/src/widget/dynamicdatetime/dynamicdatetime.popup.js index cf57d339e..e7858ba35 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.popup.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.popup.js @@ -25,7 +25,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { items: [[{ type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ @@ -37,7 +37,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Multi_Date_Today"), disabled: this._checkTodayValid(), @@ -53,7 +53,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_OK"), listeners: [{ diff --git a/src/widget/editor/editor.search.js b/src/widget/editor/editor.search.js index fea367c66..29e4983eb 100644 --- a/src/widget/editor/editor.search.js +++ b/src/widget/editor/editor.search.js @@ -20,7 +20,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, { this.editor = BI.createWidget(o.el, { type: "bi.editor", simple: o.simple, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), watermark: o.watermark, allowBlank: true, hgap: 1, @@ -44,7 +44,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, { }); BI.createWidget({ element: this, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), type: "bi.htape", items: [ { diff --git a/src/widget/editor/editor.text.js b/src/widget/editor/editor.text.js index c2da87b02..4525a2a7b 100644 --- a/src/widget/editor/editor.text.js +++ b/src/widget/editor/editor.text.js @@ -29,8 +29,8 @@ BI.TextEditor = BI.inherit(BI.Widget, { this.editor = BI.createWidget({ type: "bi.editor", element: this, - width: BI.pixFormat(o.width, border), - height: BI.pixFormat(o.height, border), + width: BI.toPix(o.width, border), + height: BI.toPix(o.height, border), simple: o.simple, hgap: o.hgap, vgap: o.vgap, diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index 9f1fb51c8..0cd8b1a94 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/src/widget/intervalslider/intervalslider.js @@ -60,8 +60,8 @@ BI.IntervalSlider = BI.inherit(BI.Single, { cls: "slider-editor-button", text: this.options.unit, allowBlank: false, - width: BI.pixFormat(c.EDITOR_WIDTH, 2), - height: BI.pixFormat(c.EDITOR_HEIGHT, 2), + width: BI.toPixDITOR_WIDTH, 2), + height: BI.toPix(c.EDITOR_HEIGHT, 2), validationChecker: function (v) { return self._checkValidation(v); } @@ -88,8 +88,8 @@ BI.IntervalSlider = BI.inherit(BI.Single, { cls: "slider-editor-button", text: this.options.unit, allowBlank: false, - width: BI.pixFormat(c.EDITOR_WIDTH, 2), - height: BI.pixFormat(c.EDITOR_HEIGHT, 2), + width: BI.toPix(c.EDITOR_WIDTH, 2), + height: BI.toPix(c.EDITOR_HEIGHT, 2), validationChecker: function (v) { return self._checkValidation(v); } diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index 6be90346a..9d334bffd 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -31,8 +31,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { if (o.allowEdit) { return { type: "bi.absolute", - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), cls, items: [ { @@ -54,7 +54,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, text: o.text, defaultText: o.defaultText, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), items: o.items, value: o.value, tipType: o.tipType, @@ -68,8 +68,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { var self = this, o = this.options; return { type: "bi.combo", - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), container: o.container, destroyWhenHide: o.destroyWhenHide, adjustLength: 2, @@ -133,7 +133,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { itemsCreator: o.itemsCreator, valueFormatter: o.valueFormatter, watermark: o.watermark, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), text: o.text, defaultText: o.defaultText, value: o.value, @@ -209,8 +209,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { ref: function (_ref) { self.triggerBtn = _ref; }, - width: BI.pixFormat(o.height, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.height, 2), + height: BI.toPix(o.height, 2), listeners: [ { eventName: BI.TriggerIconButton.EVENT_CHANGE, diff --git a/src/widget/multilayerselecttree/multilayerselecttree.popup.js b/src/widget/multilayerselecttree/multilayerselecttree.popup.js index fbe175af0..34dce3a58 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.popup.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.popup.js @@ -56,7 +56,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, { self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE); }); - this.tree.css("min-height", BI.toPix(o.minHeight - 10)); + this.tree.css("min-height", BI.pixFormat(o.minHeight - 10)); }, getValue: function () { diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index d63207f6a..74876e8d5 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -33,8 +33,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { if (o.allowEdit) { return { type: "bi.absolute", - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), cls, items: [ { @@ -56,7 +56,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { }, text: o.text, defaultText: o.defaultText, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), items: o.items, value: o.value, tipType: o.tipType, @@ -131,7 +131,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { items: o.items, itemsCreator: o.itemsCreator, valueFormatter: o.valueFormatter, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), text: o.text, defaultText: o.defaultText, value: o.value, @@ -205,8 +205,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { ref: function (_ref) { self.triggerBtn = _ref; }, - width: BI.pixFormat(o.height, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.height, 2), + height: BI.toPix(o.height, 2), listeners: [ { eventName: BI.TriggerIconButton.EVENT_CHANGE, diff --git a/src/widget/multilayersingletree/multilayersingletree.popup.js b/src/widget/multilayersingletree/multilayersingletree.popup.js index 666bdeb88..630c38237 100644 --- a/src/widget/multilayersingletree/multilayersingletree.popup.js +++ b/src/widget/multilayersingletree/multilayersingletree.popup.js @@ -55,7 +55,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, { self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE); }); - this.tree.css("min-height", BI.toPix(o.minHeight - 10)); + this.tree.css("min-height", BI.pixFormat(o.minHeight - 10)); }, getValue: function () { diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 807bffcdb..5651fa04f 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -45,7 +45,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.multi_select_trigger", allowEdit: o.allowEdit, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), text: o.text, defaultText: o.defaultText, masker: { diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 16b24855e..1734124af 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -41,7 +41,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ 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, defaultText: o.defaultText, masker: { diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index b473b4628..6540e0dc9 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -40,7 +40,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.multi_select_insert_trigger", allowEdit: o.allowEdit, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), text: o.text, watermark: o.watermark, defaultText: o.defaultText, diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index ad47d1608..c7ff2109d 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -41,7 +41,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ 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, // adapter: this.popup, masker: { diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index 83b0cb741..d48e8d6db 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -27,7 +27,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.multi_select_trigger", allowEdit: o.allowEdit, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), valueFormatter: o.valueFormatter, text: o.text, defaultText: o.defaultText, diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index ab3922f13..c9ce5545f 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -28,7 +28,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.multi_select_trigger", allowEdit: o.allowEdit, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), valueFormatter: o.valueFormatter, text: o.text, defaultText: o.defaultText, diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 41a3d15a8..9b82b8780 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -32,7 +32,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { text: o.text, defaultText: o.defaultText, watermark: o.watermark, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), valueFormatter: o.valueFormatter, masker: { offset: { diff --git a/src/widget/numbereditor/number.editor.js b/src/widget/numbereditor/number.editor.js index 0dead38cf..383560bf8 100644 --- a/src/widget/numbereditor/number.editor.js +++ b/src/widget/numbereditor/number.editor.js @@ -27,7 +27,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, { var self = this, o = this.options; this.editor = BI.createWidget({ type: "bi.sign_editor", - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), simple: o.simple, allowBlank: o.allowBlank, value: o.valueFormatter(o.value), @@ -87,7 +87,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, { }); BI.createWidget({ type: "bi.htape", - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), element: this, items: [this.editor, { el: { diff --git a/src/widget/numberinterval/numberinterval.js b/src/widget/numberinterval/numberinterval.js index c68de273b..0c3c488bd 100644 --- a/src/widget/numberinterval/numberinterval.js +++ b/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: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), watermark: o.watermark, allowBlank: o.allowBlank, value: o.min, @@ -61,7 +61,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { this.smallTip = BI.createWidget({ type: "bi.label", text: o.numTip, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(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: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), watermark: o.watermark, allowBlank: o.allowBlank, value: o.max, @@ -99,7 +99,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { this.bigTip = BI.createWidget({ type: "bi.label", text: o.numTip, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), invisible: true }); BI.createWidget({ @@ -114,8 +114,8 @@ BI.NumberInterval = BI.inherit(BI.Single, { this.smallCombo = BI.createWidget({ 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"), - height: BI.pixFormat(o.height, o.simple ? 0 : 2), - width: BI.pixFormat(c.width, c.border), + height: BI.toPix(o.height, o.simple ? 0 : 2), + width: BI.toPix(c.width, c.border), items: [{ text: "(" + BI.i18nText("BI-Less_Than") + ")", iconCls: "less-font", @@ -134,8 +134,8 @@ BI.NumberInterval = BI.inherit(BI.Single, { this.bigCombo = BI.createWidget({ 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"), - height: BI.pixFormat(o.height, o.simple ? 0 : 2), - width: BI.pixFormat(c.width, c.border), + height: BI.toPix(o.height, o.simple ? 0 : 2), + width: BI.toPix(c.width, c.border), items: [{ text: "(" + BI.i18nText("BI-Less_Than") + ")", iconCls: "less-font", @@ -155,7 +155,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { type: "bi.label", text: BI.i18nText("BI-Basic_Value"), 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, height: o.height, level: "warning", diff --git a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js index e6259e684..4fdbf42ee 100644 --- a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js +++ b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js @@ -35,7 +35,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.search_multi_select_trigger", text: o.text, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), // adapter: this.popup, masker: { offset: { diff --git a/src/widget/selecttree/selecttree.combo.js b/src/widget/selecttree/selecttree.combo.js index 5f2147bae..5095c120d 100644 --- a/src/widget/selecttree/selecttree.combo.js +++ b/src/widget/selecttree/selecttree.combo.js @@ -22,7 +22,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, { this.trigger = BI.createWidget({ type: "bi.single_tree_trigger", text: o.text, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), items: o.items, value: o.value, allowClear: o.allowClear, @@ -41,8 +41,8 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, { this.combo = BI.createWidget({ type: "bi.combo", - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), container: o.container, element: this, adjustLength: 2, diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js index 81140cfd0..cc4d7c261 100644 --- a/src/widget/singleselect/singleselect.combo.js +++ b/src/widget/singleselect/singleselect.combo.js @@ -31,7 +31,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ 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, allowNoSelect: o.allowNoSelect, allowEdit: o.allowEdit, diff --git a/src/widget/singleselect/singleselect.insert.combo.js b/src/widget/singleselect/singleselect.insert.combo.js index 039283d79..a36bf0bd6 100644 --- a/src/widget/singleselect/singleselect.insert.combo.js +++ b/src/widget/singleselect/singleselect.insert.combo.js @@ -32,7 +32,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.single_select_trigger", watermark: o.watermark, - height: BI.pixFormat(o.height, o.simple ? 1 : 2), + height: BI.toPix(o.height, o.simple ? 1 : 2), allowNoSelect: o.allowNoSelect, allowEdit: o.allowEdit, // adapter: this.popup, diff --git a/src/widget/singleselect/singleselect.list.js b/src/widget/singleselect/singleselect.list.js index e60ea267a..9842eb3ea 100644 --- a/src/widget/singleselect/singleselect.list.js +++ b/src/widget/singleselect/singleselect.list.js @@ -120,7 +120,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, { resetHeight: function (h) { this.list.resetHeight ? this.list.resetHeight(h) : - this.list.element.css({"max-height": BI.toPix(h - (this.options.allowNoSelect ? this._constants.itemHeight : 0))}); + this.list.element.css({"max-height": BI.pixFormat(h - (this.options.allowNoSelect ? this._constants.itemHeight : 0))}); }, setNotSelectedValue: function () { diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index 15410cb1a..8cf77b180 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -99,8 +99,8 @@ BI.SingleSlider = BI.inherit(BI.Single, { type: "bi.sign_text_editor", cls: "slider-editor-button", text: o.unit, - width: BI.pixFormat(c.EDITOR_WIDTH, 2), - height: BI.pixFormat(c.EDITOR_HEIGHT, 2), + width: BI.toPix(c.EDITOR_WIDTH, 2), + height: BI.toPix(c.EDITOR_HEIGHT, 2), allowBlank: false, textAlign: "center", validationChecker: function (v) { diff --git a/src/widget/singleslider/singleslider.label.js b/src/widget/singleslider/singleslider.label.js index 7e8da3019..c9ec33998 100644 --- a/src/widget/singleslider/singleslider.label.js +++ b/src/widget/singleslider/singleslider.label.js @@ -97,7 +97,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, { this.label = BI.createWidget({ type: "bi.label", height: c.HEIGHT, - width: BI.pixFormat(c.EDITOR_WIDTH, 2) + width: BI.toPix(c.EDITOR_WIDTH, 2) }); this._setVisible(false); diff --git a/src/widget/singletree/singletree.combo.js b/src/widget/singletree/singletree.combo.js index 2c9319c59..589c205c6 100644 --- a/src/widget/singletree/singletree.combo.js +++ b/src/widget/singletree/singletree.combo.js @@ -24,7 +24,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, { type: "bi.single_tree_trigger", text: o.text, defaultText: o.defaultText, - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), items: o.items, value: o.value, allowClear: o.allowClear, @@ -43,8 +43,8 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, { this.combo = BI.createWidget({ type: "bi.combo", - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), container: o.container, element: this, adjustLength: 2, diff --git a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js index 2a1e254fd..9410d9190 100644 --- a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js +++ b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js @@ -22,7 +22,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { this.trigger = BI.createWidget({ type: "bi.down_list_select_text_trigger", cls: "text-value-down-list-trigger", - height: BI.pixFormat(o.height, 2), + height: BI.toPix(o.height, 2), items: o.items, text: o.text, value: value @@ -33,8 +33,8 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { element: this, chooseType: BI.Selection.Single, adjustLength: 2, - width: BI.pixFormat(o.width, 2), - height: BI.pixFormat(o.height, 2), + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), el: this.trigger, value: BI.isNull(value) ? [] : [value], items: BI.deepClone(o.items) diff --git a/src/widget/time/time.combo.js b/src/widget/time/time.combo.js index 1ba03c2d3..6f3f8947d 100644 --- a/src/widget/time/time.combo.js +++ b/src/widget/time/time.combo.js @@ -72,10 +72,10 @@ el: { type: "bi.horizontal_fill", columnSize: ["fill", this.constants.iconWidth], - height: BI.pixFormat(opts.height, 2), + height: BI.toPix(opts.height, 2), items: [{ type: "bi.time_trigger", - height: BI.pixFormat(opts.height, 2), + height: BI.toPix(opts.height, 2), allowEdit: opts.allowEdit, watermark: opts.watermark, format: opts.format, diff --git a/src/widget/year/combo.year.js b/src/widget/year/combo.year.js index c9f456a1b..558a6c62a 100644 --- a/src/widget/year/combo.year.js +++ b/src/widget/year/combo.year.js @@ -23,7 +23,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, { simple: o.simple, min: o.minDate, max: o.maxDate, - height: BI.pixFormat(o.height, border), + height: BI.toPix(o.height, border), value: o.value || "", watermark: o.watermark }); @@ -143,7 +143,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, { type: "bi.icon_button", cls: "bi-trigger-icon-button", width: this._const.iconWidth, - height: BI.pixFormat(o.height, border), + height: BI.toPix(o.height, border), ref: function () { self.changeIcon = this; } diff --git a/src/widget/year/popup.year.js b/src/widget/year/popup.year.js index 6a7c883c6..142937aa0 100644 --- a/src/widget/year/popup.year.js +++ b/src/widget/year/popup.year.js @@ -32,7 +32,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { items: [[{ type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ @@ -43,7 +43,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { }] }, { 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", shadow: true, text: BI.i18nText("BI-Basic_Current_Year"), @@ -60,7 +60,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_OK"), listeners: [{ diff --git a/src/widget/yearmonth/card.static.yearmonth.js b/src/widget/yearmonth/card.static.yearmonth.js index c0ababb9a..6ba4a94bc 100644 --- a/src/widget/yearmonth/card.static.yearmonth.js +++ b/src/widget/yearmonth/card.static.yearmonth.js @@ -19,7 +19,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, { whiteSpace: "nowrap", once: false, forceSelected: true, - height: BI.pixFormat(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1), + height: BI.toPix(BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, 1), width: 38, value: td, text: td, diff --git a/src/widget/yearmonth/combo.yearmonth.js b/src/widget/yearmonth/combo.yearmonth.js index 23b9dfd01..4a85db0f2 100644 --- a/src/widget/yearmonth/combo.yearmonth.js +++ b/src/widget/yearmonth/combo.yearmonth.js @@ -22,7 +22,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { simple: o.simple, min: o.minDate, max: o.maxDate, - height: BI.pixFormat(o.height, border), + height: BI.toPix(o.height, border), value: o.value || "", watermark: o.watermark, }); @@ -142,8 +142,8 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { el: { type: "bi.icon_button", cls: "bi-trigger-icon-button", - width: BI.pixFormat(o.height, border), - height: BI.pixFormat(o.height, border), + width: BI.toPix(o.height, border), + height: BI.toPix(o.height, border), ref: function () { self.changeIcon = this; } diff --git a/src/widget/yearmonth/popup.yearmonth.js b/src/widget/yearmonth/popup.yearmonth.js index f1bcd11a2..1b80214d7 100644 --- a/src/widget/yearmonth/popup.yearmonth.js +++ b/src/widget/yearmonth/popup.yearmonth.js @@ -32,7 +32,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { items: [[{ type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ @@ -44,7 +44,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Current_Month"), disabled: this._checkTodayValid(), @@ -60,7 +60,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_OK"), listeners: [{ diff --git a/src/widget/yearquarter/combo.yearquarter.js b/src/widget/yearquarter/combo.yearquarter.js index 0292ef55b..455fd9901 100644 --- a/src/widget/yearquarter/combo.yearquarter.js +++ b/src/widget/yearquarter/combo.yearquarter.js @@ -25,7 +25,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { simple: o.simple, min: o.minDate, max: o.maxDate, - height: BI.pixFormat(o.height, border), + height: BI.toPix(o.height, border), value: o.value || "", watermark: o.watermark, }); @@ -146,7 +146,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { type: "bi.icon_button", cls: "bi-trigger-icon-button", width: this._consts.iconWidth, - height: BI.pixFormat(o.height, border), + height: BI.toPix(o.height, border), ref: function () { self.changeIcon = this; } diff --git a/src/widget/yearquarter/popup.yearquarter.js b/src/widget/yearquarter/popup.yearquarter.js index 638cebec3..6cfbc519a 100644 --- a/src/widget/yearquarter/popup.yearquarter.js +++ b/src/widget/yearquarter/popup.yearquarter.js @@ -27,7 +27,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "bi-split-top bi-high-light", 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"), listeners: [{ eventName: BI.TextButton.EVENT_CHANGE, @@ -38,7 +38,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Current_Quarter"), disabled: this._checkTodayValid(), @@ -55,7 +55,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "bi-split-top bi-high-light", 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"), listeners: [{ eventName: BI.TextButton.EVENT_CHANGE, From d8bca12898377bbe5a2d3a143079d86a9ca4b0f6 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Oct 2022 21:59:47 +0800 Subject: [PATCH 12/21] bugfix --- src/widget/intervalslider/intervalslider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index 0cd8b1a94..b712a3db6 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/src/widget/intervalslider/intervalslider.js @@ -60,7 +60,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, { cls: "slider-editor-button", text: this.options.unit, allowBlank: false, - width: BI.toPixDITOR_WIDTH, 2), + width: BI.toPix(DITOR_WIDTH, 2), height: BI.toPix(c.EDITOR_HEIGHT, 2), validationChecker: function (v) { return self._checkValidation(v); From 3586eeab05f4cc9b2f6ce24aa5772f5d98c94d61 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Oct 2022 22:00:54 +0800 Subject: [PATCH 13/21] bugfix --- src/widget/intervalslider/intervalslider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index b712a3db6..71351dd71 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/src/widget/intervalslider/intervalslider.js @@ -60,7 +60,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, { cls: "slider-editor-button", text: this.options.unit, allowBlank: false, - width: BI.toPix(DITOR_WIDTH, 2), + width: BI.toPix(c.EDITOR_WIDTH, 2), height: BI.toPix(c.EDITOR_HEIGHT, 2), validationChecker: function (v) { return self._checkValidation(v); From adb17ca617e058322fe316c9fbfbb3e3611bc9ae Mon Sep 17 00:00:00 2001 From: data Date: Sat, 22 Oct 2022 22:24:36 +0800 Subject: [PATCH 14/21] auto upgrade version to 2.0.20221022222430 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 20d118ed6..ed3fc28d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221022202435", + "version": "2.0.20221022222430", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 9d2264c4803fc2dc66c0ea6c89eaa257a186c96f Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 23 Oct 2022 10:26:46 +0800 Subject: [PATCH 15/21] =?UTF-8?q?=E5=8F=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/constant/var.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/constant/var.js b/src/core/constant/var.js index f0a4e2db8..f9acb8b30 100644 --- a/src/core/constant/var.js +++ b/src/core/constant/var.js @@ -16,7 +16,7 @@ BI._.extend(BI, { pixUnit: "px", pixRatio: 1, // 一定返回最终的单位 - toPix: function (pix, border) { + pixFormat: function (pix, border) { if (!BI.isNumber(pix)) { return pix; } @@ -29,7 +29,7 @@ BI._.extend(BI, { } return length; }, - pixFormat: function (pix, border) { + toPix: function (pix, border) { if (!BI.isNumber(pix)) { return pix; } From bf0621754a21b5e6433d803c02df52926abf61f1 Mon Sep 17 00:00:00 2001 From: data Date: Sun, 23 Oct 2022 10:54:37 +0800 Subject: [PATCH 16/21] auto upgrade version to 2.0.20221023105429 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed3fc28d5..852b35c1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221022222430", + "version": "2.0.20221023105429", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 5a9c3b489a5fc5fa48072d637a0a8a5d614bc1eb Mon Sep 17 00:00:00 2001 From: zsmj Date: Sun, 23 Oct 2022 11:26:22 +0800 Subject: [PATCH 17/21] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/dynamicdatetime/dynamicdatetime.combo.js | 2 +- .../multiselect/search/multiselect.search.insert.pane.js | 4 ++-- src/widget/multiselectlist/multiselectlist.insert.js | 7 ++----- .../search/singleselect.search.pane.insert.js | 7 ++++--- .../singleselect/search/singleselect.search.pane.js | 6 +++--- src/widget/singleselect/singleselectlist.insert.js | 8 +++----- src/widget/year/popup.year.js | 4 ++-- 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js index 5077d7866..1006a0f85 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -8,7 +8,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { }, props: { - baseCls: "bi-dynamic-date-combo", + baseCls: "bi-dynamic-date--time-combo", height: 24, minDate: "1900-01-01", maxDate: "2099-12-31", diff --git a/src/widget/multiselect/search/multiselect.search.insert.pane.js b/src/widget/multiselect/search/multiselect.search.insert.pane.js index e72b64661..d459dc73a 100644 --- a/src/widget/multiselect/search/multiselect.search.insert.pane.js +++ b/src/widget/multiselect/search/multiselect.search.insert.pane.js @@ -54,11 +54,11 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, { }); this.resizer = BI.createWidget({ - type: "bi.vtape", + type: "bi.vertical_fill", + rowSize: ["", "fill"], element: this, items: [{ el: this.addNotMatchTip, - height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }, { el: this.loader, }], diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index cc905c88f..8b6e8785f 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -74,7 +74,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { ref: function (ref) { self.editor = ref; }, - height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT, }, isAutoSearch: false, isAutoSync: false, @@ -83,7 +82,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { }, adapter: this.adapter, popup: this.searcherPane, - height: 200, masker: false, listeners: [{ eventName: BI.Searcher.EVENT_START, @@ -168,14 +166,13 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { }); BI.createWidget({ - type: "bi.vtape", + type: "bi.vertical_fill", + rowSize: ["", "fill"], element: this, items: [{ el: this.trigger, - height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT, }, { el: this.adapter, - height: "fill" }] }); BI.createWidget({ diff --git a/src/widget/singleselect/search/singleselect.search.pane.insert.js b/src/widget/singleselect/search/singleselect.search.pane.insert.js index 95fd13cc3..6c1e49af2 100644 --- a/src/widget/singleselect/search/singleselect.search.pane.insert.js +++ b/src/widget/singleselect/search/singleselect.search.pane.insert.js @@ -15,7 +15,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { _defaultConfig: function () { 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, itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, @@ -53,7 +53,8 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { }); this.resizer = BI.createWidget({ - type: "bi.vtape", + type: "bi.vertical_fill", + rowSize: ["", "fill"], element: this, items: [{ type: "bi.vertical", @@ -92,4 +93,4 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane); \ No newline at end of file +BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane); diff --git a/src/widget/singleselect/search/singleselect.search.pane.js b/src/widget/singleselect/search/singleselect.search.pane.js index e5364e261..ea923c5f6 100644 --- a/src/widget/singleselect/search/singleselect.search.pane.js +++ b/src/widget/singleselect/search/singleselect.search.pane.js @@ -53,11 +53,11 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, { }); this.resizer = BI.createWidget({ - type: "bi.vtape", + type: "bi.vertical_fill", + rowSize: ["", "fill"], element: this, items: [{ el: this.tooltipClick, - height: 0 }, { el: this.loader }] @@ -98,4 +98,4 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, { BI.SingleSelectSearchPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.single_select_search_pane", BI.SingleSelectSearchPane); \ No newline at end of file +BI.shortcut("bi.single_select_search_pane", BI.SingleSelectSearchPane); diff --git a/src/widget/singleselect/singleselectlist.insert.js b/src/widget/singleselect/singleselectlist.insert.js index f9bce32e6..9e953468c 100644 --- a/src/widget/singleselect/singleselectlist.insert.js +++ b/src/widget/singleselect/singleselectlist.insert.js @@ -6,7 +6,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, { _defaultConfig: function () { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-insert-list", + baseCls: "bi-single-select-insert-list", allowNoSelect: false, itemsCreator: BI.emptyFn, itemWrapper: BI.emptyFn, @@ -81,7 +81,6 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, { }, adapter: this.adapter, popup: this.searcherPane, - height: 200, masker: false, value: o.value, listeners: [{ @@ -124,14 +123,13 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, { }); BI.createWidget({ - type: "bi.vtape", + type: "bi.vertical_fill", + rowSize: ["", "fill"], element: this, items: [{ el: this.trigger, - height: 24 }, { el: this.adapter, - height: "fill" }] }); BI.createWidget({ diff --git a/src/widget/year/popup.year.js b/src/widget/year/popup.year.js index 6a7c883c6..67d0cfa90 100644 --- a/src/widget/year/popup.year.js +++ b/src/widget/year/popup.year.js @@ -11,7 +11,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { }, props: { - baseCls: "bi-year-popup", + baseCls: "bi-dynamic-year-popup", behaviors: {}, min: "1900-01-01", // 最小日期 max: "2099-12-31", // 最大日期, @@ -243,4 +243,4 @@ BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE"; BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE = "BUTTON_lABEL_EVENT_CHANGE"; BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; BI.DynamicYearPopup.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup); \ No newline at end of file +BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup); From cbf5ee229588092e2116306ba5cfb2340b8310b0 Mon Sep 17 00:00:00 2001 From: zsmj Date: Sun, 23 Oct 2022 11:26:34 +0800 Subject: [PATCH 18/21] =?UTF-8?q?Revert=20"=E6=97=A0JIRA=20fix:=20=5FinitE?= =?UTF-8?q?lementHeight=E5=92=8C=5FinitElementWidth=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 95ec11b82453f9e8a6d73858cce85012a140fce1. --- src/core/4.widget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 8be3a9058..1873e0b44 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -289,14 +289,14 @@ _initElementWidth: function () { var o = this.options; if (BI.isWidthOrHeight(o.width)) { - this.element.css("width", BI.isNumber(o.width) ? BI.pixFormat(o.width) : o.width); + this.element.css("width", BI.toPix(o.width)); } }, _initElementHeight: function () { var o = this.options; if (BI.isWidthOrHeight(o.height)) { - this.element.css("height", BI.isNumber(o.height) ? BI.pixFormat(o.height) : o.height); + this.element.css("height", BI.toPix(o.height)); } }, From 7b4ac8461920112b1c42e0c06472fc48500046cb Mon Sep 17 00:00:00 2001 From: data Date: Sun, 23 Oct 2022 14:44:34 +0800 Subject: [PATCH 19/21] auto upgrade version to 2.0.20221023144426 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 852b35c1b..ad3c79333 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221023105429", + "version": "2.0.20221023144426", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 38502dd94a2b5b3f1500f5ca0bcfec925e5a60f9 Mon Sep 17 00:00:00 2001 From: zsmj Date: Sun, 23 Oct 2022 16:08:38 +0800 Subject: [PATCH 20/21] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?tape=E5=B8=83=E5=B1=80=20NaN=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout/layout.tape.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/wrapper/layout/layout.tape.js b/src/core/wrapper/layout/layout.tape.js index a3fa8bcf0..185af813d 100644 --- a/src/core/wrapper/layout/layout.tape.js +++ b/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) }); - if (columnSize === "" || columnSize === "fill") { + if (BI.isNull(columnSize) || columnSize === "" || columnSize === "fill") { 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) }); - if (columnSize === "" || columnSize === "fill") { + if (BI.isNull(columnSize) || columnSize === "" || columnSize === "fill") { return true; } }); From 01b22956bbc86a992696c5bd793a77af2e0fc229 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 24 Oct 2022 10:14:01 +0800 Subject: [PATCH 21/21] auto upgrade version to 2.0.20221024101340 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad3c79333..4f9c42e73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221023144426", + "version": "2.0.20221024101340", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",