@arco-design/mobile-react 2.30.6 → 2.30.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/checkbox/style/css/index.css +0 -3
- package/cjs/checkbox/style/index.less +0 -5
- package/cjs/ellipsis/components/js-ellipsis.js +4 -2
- package/cjs/radio/style/css/index.css +0 -3
- package/cjs/radio/style/index.less +0 -5
- package/dist/index.js +3 -2
- package/dist/index.min.js +2 -2
- package/dist/style.css +3 -6
- package/dist/style.min.css +1 -1
- package/esm/checkbox/style/css/index.css +0 -3
- package/esm/checkbox/style/index.less +0 -5
- package/esm/ellipsis/components/js-ellipsis.js +4 -2
- package/esm/radio/style/css/index.css +0 -3
- package/esm/radio/style/index.less +0 -5
- package/package.json +3 -3
- package/style/css/public.css +3 -0
- package/umd/checkbox/style/css/index.css +0 -3
- package/umd/checkbox/style/index.less +0 -5
- package/umd/ellipsis/components/js-ellipsis.js +4 -2
- package/umd/radio/style/css/index.css +0 -3
- package/umd/radio/style/index.less +0 -5
@@ -81,7 +81,6 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
81
81
|
function truncateHTML(container, textContainer, max) {
|
82
82
|
// only enter this function when container overflow.
|
83
83
|
var children = textContainer.childNodes;
|
84
|
-
var actualHeight = getActualHeight(container);
|
85
84
|
|
86
85
|
if (children.length === 1) {
|
87
86
|
var node = children[0];
|
@@ -92,6 +91,7 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
92
91
|
var html = node.innerHTML; // clear content to determine whether the empty node can be placed.
|
93
92
|
|
94
93
|
node.innerHTML = '';
|
94
|
+
var actualHeight = getActualHeight(container);
|
95
95
|
|
96
96
|
if (actualHeight > max) {
|
97
97
|
// return after remove the node, if overflow with empty node.
|
@@ -112,7 +112,9 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
112
112
|
while (i < nodes.length) {
|
113
113
|
textContainer.appendChild(nodes[i]);
|
114
114
|
|
115
|
-
|
115
|
+
var _actualHeight = getActualHeight(container);
|
116
|
+
|
117
|
+
if (_actualHeight > max) {
|
116
118
|
if (nodes[i].childNodes && nodes[i].childNodes.length) {
|
117
119
|
break;
|
118
120
|
} else {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.30.
|
3
|
+
"version": "2.30.7",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.17.
|
18
|
+
"@arco-design/mobile-utils": "2.17.7",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"lodash.throttle": "^4.1.1",
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"publishConfig": {
|
50
50
|
"access": "public"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "18760da2a4de19dc44e69e5999cd9577a69af30e"
|
53
53
|
}
|
package/style/css/public.css
CHANGED
@@ -104,7 +104,6 @@
|
|
104
104
|
function truncateHTML(container, textContainer, max) {
|
105
105
|
// only enter this function when container overflow.
|
106
106
|
var children = textContainer.childNodes;
|
107
|
-
var actualHeight = getActualHeight(container);
|
108
107
|
|
109
108
|
if (children.length === 1) {
|
110
109
|
var node = children[0];
|
@@ -115,6 +114,7 @@
|
|
115
114
|
var html = node.innerHTML; // clear content to determine whether the empty node can be placed.
|
116
115
|
|
117
116
|
node.innerHTML = '';
|
117
|
+
var actualHeight = getActualHeight(container);
|
118
118
|
|
119
119
|
if (actualHeight > max) {
|
120
120
|
// return after remove the node, if overflow with empty node.
|
@@ -135,7 +135,9 @@
|
|
135
135
|
while (i < nodes.length) {
|
136
136
|
textContainer.appendChild(nodes[i]);
|
137
137
|
|
138
|
-
|
138
|
+
var _actualHeight = getActualHeight(container);
|
139
|
+
|
140
|
+
if (_actualHeight > max) {
|
139
141
|
if (nodes[i].childNodes && nodes[i].childNodes.length) {
|
140
142
|
break;
|
141
143
|
} else {
|