From 95ec11b82453f9e8a6d73858cce85012a140fce1 Mon Sep 17 00:00:00 2001 From: zsmj Date: Sat, 22 Oct 2022 21:11:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=5FinitElementHeight?= =?UTF-8?q?=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); } },