@arco-design/mobile-react 2.24.1 → 2.24.2

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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.24.2](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.24.1...@arco-design/mobile-react@2.24.2) (2023-01-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * `Ellipsis` innerHTML keep wrap ([#80](https://github.com/arco-design/arco-design-mobile/issues/80)) ([29afadc](https://github.com/arco-design/arco-design-mobile/commit/29afadc571bba16fd2b8641622de1f2d0fbf5ba4))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.24.1](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.24.0...@arco-design/mobile-react@2.24.1) (2023-01-04)
7
18
 
8
19
 
package/README.en-US.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.24.0/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.24.0/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.24.1/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.24.1/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## Full import
package/README.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.24.0/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.24.0/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.24.1/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.24.1/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## 引入全部
@@ -156,6 +156,7 @@ var JsEllipsis = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
156
156
 
157
157
  if (dangerouslyUseInnerHTML) {
158
158
  textRef.current.innerHTML = text;
159
+ textRef.current.classList.add(prefixCls + "-js-content-text-pre");
159
160
  } else {
160
161
  textRef.current.innerText = text;
161
162
  }
@@ -164,6 +165,8 @@ var JsEllipsis = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
164
165
  return;
165
166
  }
166
167
 
168
+ textRef.current.classList.remove(prefixCls + "-js-content-text-pre");
169
+
167
170
  var _domRef$current$getBo = domRef.current.getBoundingClientRect(),
168
171
  height = _domRef$current$getBo.height;
169
172
 
@@ -18,6 +18,9 @@
18
18
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff 20PX, #ffffff) ;
19
19
  padding-left: 20PX ;
20
20
  }
21
+ .arco-ellipsis-js-content-text-pre {
22
+ white-space: pre-line;
23
+ }
21
24
  .arco-ellipsis-js-content-ellipsis {
22
25
  display: none;
23
26
  }
@@ -21,6 +21,10 @@
21
21
  .use-var(padding-left, ellipsis-float-ellipsis-node-padding-left);
22
22
  }
23
23
 
24
+ &-js-content-text-pre {
25
+ white-space: pre-line;
26
+ }
27
+
24
28
  &-js-content-ellipsis {
25
29
  display: none;
26
30
  }
package/dist/index.js CHANGED
@@ -12308,6 +12308,7 @@
12308
12308
 
12309
12309
  if (dangerouslyUseInnerHTML) {
12310
12310
  textRef.current.innerHTML = text;
12311
+ textRef.current.classList.add(prefixCls + "-js-content-text-pre");
12311
12312
  } else {
12312
12313
  textRef.current.innerText = text;
12313
12314
  }
@@ -12316,6 +12317,7 @@
12316
12317
  return;
12317
12318
  }
12318
12319
 
12320
+ textRef.current.classList.remove(prefixCls + "-js-content-text-pre");
12319
12321
  var height = domRef.current.getBoundingClientRect().height;
12320
12322
  var max = isNaN(Number(maxHeight)) ? lineHeightRef.current * maxLine : Number(maxHeight);
12321
12323