Repository: ant-design/ant-design-mobile (ts)

Issue:
 5.31.0 Ellipsis对于换行符\n计算问题
### Version of antd-mobile

5.31.0

### Operating system and its version

Others

### Browser and its version

_No response_

### Sandbox to reproduce

5.31.0
https://codesandbox.io/s/crimson-http-z75h4w?file=/app.tsx

5.30.0
https://codesandbox.io/s/infallible-cookies-vpxdhv

### What happened?
应该是innerText 改为 innerHTML的原因
感觉可以从whiteSpace 上做更改
在获取父元素style样式之前赋值container.style.whiteSpace = 'normal'; 可行吗？

### Relevant log output

_No response_

Pull request description:
fix(Ellipsis): the `whiteSpace` style of the calc container should be the same as Ellipsis
Close #6338

Patch:
diff --git a/src/components/ellipsis/ellipsis.tsx b/src/components/ellipsis/ellipsis.tsx
index d992fd63f..ed59b211e 100644
--- a/src/components/ellipsis/ellipsis.tsx
+++ b/src/components/ellipsis/ellipsis.tsx
@@ -74,7 +74,6 @@ export const Ellipsis: FC<EllipsisProps> = p => {
     container.style.minHeight = 'auto'
     container.style.maxHeight = 'auto'
     container.style.textOverflow = 'clip'
-    container.style.whiteSpace = 'normal'
     container.style.webkitLineClamp = 'unset'
     container.style.display = 'block'
 


Test patch:
diff --git a/src/components/ellipsis/tests/ellipsis.test.tsx b/src/components/ellipsis/tests/ellipsis.test.tsx
index 763afca20..fdb89ed8b 100644
--- a/src/components/ellipsis/tests/ellipsis.test.tsx
+++ b/src/components/ellipsis/tests/ellipsis.test.tsx
@@ -151,4 +151,22 @@ describe('Ellipsis', () => {
     fireEvent.click(getByText('expand'))
     expect(getByText('collapse')).toBeInTheDocument()
   })
+
+  test('the `whiteSpace` style of the calc container should be the same as Ellipsis', () => {
+    let container: Element | null = null
+    Object.defineProperty(HTMLElement.prototype, 'removeChild', {
+      value: (child: Element) => {
+        container = child
+      },
+    })
+    render(
+      <Ellipsis
+        style={{
+          whiteSpace: 'pre-wrap',
+        }}
+        content={content}
+      />
+    )
+    expect(container).toHaveStyle('white-space: pre-wrap')
+  })
 })