From 4ff54e7bb90269581e1b772e795a0934fc9aeb8a Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 25 Oct 2021 18:40:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E9=83=BD=E9=87=87=E7=94=A8ma?= =?UTF-8?q?xWidth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/label/abstract.label.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index c9a6eb608..fe55e8e65 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -211,7 +211,7 @@ var json = this._createJson(); if (BI.isNumber(o.width) && o.width > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - json.width = o.textWidth; + json.maxWidth = o.textWidth; if (BI.isNumber(o.height) && o.height > 0) { // 2.1 BI.createWidget({ type: adaptLayout, @@ -265,7 +265,7 @@ } return; } - json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; + json.maxWidth = o.width - 2 * o.hgap - o.lgap - o.rgap; BI.createWidget({ // 2.4 type: adaptLayout, horizontalAlign: o.textAlign, @@ -285,7 +285,7 @@ return; } if (BI.isNumber(o.textWidth) && o.textWidth > 0) { - json.width = o.textWidth; + json.maxWidth = o.textWidth; BI.createWidget({ // 2.5 type: adaptLayout, horizontalAlign: o.textAlign,