From a85b274bdfe70f7e31255d96f0e488a550c354d1 Mon Sep 17 00:00:00 2001 From: qcc Date: Fri, 29 Mar 2019 13:58:00 +0800 Subject: [PATCH] =?UTF-8?q?BI-41992=20fix:=20nowrap=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E6=89=8D=E8=AE=BE=E7=BD=AEellipsis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.ie.js | 6 ++++-- dist/2.0/fineui.js | 6 ++++-- dist/base.js | 6 ++++-- dist/bundle.ie.js | 6 ++++-- dist/bundle.js | 6 ++++-- dist/fineui.ie.js | 6 ++++-- dist/fineui.js | 6 ++++-- dist/fineui_without_jquery_polyfill.js | 6 ++++-- src/base/single/html/html.js | 3 ++- src/base/single/text.js | 3 ++- src/less/base/single/label.less | 2 +- src/less/base/single/text.less | 2 +- 12 files changed, 38 insertions(+), 20 deletions(-) diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index eb27b0e788..02da352b2e 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -36019,7 +36019,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -44563,7 +44564,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 591a2a14b1..378ed9434f 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -36423,7 +36423,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -44967,7 +44968,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/base.js b/dist/base.js index 90fc37ff95..f8da10b4e8 100644 --- a/dist/base.js +++ b/dist/base.js @@ -581,7 +581,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -9125,7 +9126,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index eb27b0e788..02da352b2e 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -36019,7 +36019,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -44563,7 +44564,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/bundle.js b/dist/bundle.js index 591a2a14b1..378ed9434f 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -36423,7 +36423,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -44967,7 +44968,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 9d9099f0d0..632206ca01 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -36264,7 +36264,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -44808,7 +44809,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/fineui.js b/dist/fineui.js index 4db1ff0975..093de35d2d 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -36668,7 +36668,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -45212,7 +45213,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 28b209e06b..fc469bf172 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -25112,7 +25112,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ @@ -32743,7 +32744,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/src/base/single/html/html.js b/src/base/single/html/html.js index 9b38ac89a5..8bea91abe5 100644 --- a/src/base/single/html/html.js +++ b/src/base/single/html/html.js @@ -52,7 +52,8 @@ BI.Html = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/src/base/single/text.js b/src/base/single/text.js index f6ea0f6a48..0ed1123c25 100644 --- a/src/base/single/text.js +++ b/src/base/single/text.js @@ -54,7 +54,8 @@ BI.Text = BI.inherit(BI.Single, { } this.element.css({ textAlign: o.textAlign, - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, + textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", }); if (o.handler) { this.text = BI.createWidget({ diff --git a/src/less/base/single/label.less b/src/less/base/single/label.less index e7b8a7cf95..726d2a208d 100644 --- a/src/less/base/single/label.less +++ b/src/less/base/single/label.less @@ -1,6 +1,6 @@ @import "../../index"; .bi-label { - .overflow-dot(); + .overflow-hidden(); word-break: break-all; } \ No newline at end of file diff --git a/src/less/base/single/text.less b/src/less/base/single/text.less index b0be085325..f34506308d 100644 --- a/src/less/base/single/text.less +++ b/src/less/base/single/text.less @@ -1,7 +1,7 @@ @import "../../index"; .bi-text { - .overflow-dot(); + .overflow-hidden(); .box-sizing(border-box); // BI-9141 加的,但是去掉后在firefox下没有问题,先去掉以适配ie9 word-break: break-word;