ant-design / ant-design/pro-components
🐛[BUG] 表单 readonly 模式下,输入超长英文单词没有自动换行,导致文本溢出
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
表单 readonly 模式下,输入超长英文单词没有自动换行,导致文本溢出
### 📷 复现步骤

https://codesandbox.io/p/github/polaris-dxz/procomponents-demo/master?file=%2Fsrc%2Fpages%2FHome%2Findex.tsx&workspaceId=21d3a789-2efe-4b29-bfbd-e3f861d8c45b
https://54yjky-8000.csb.app/home
### 🏞 期望结果
期望在 readonly 模式下,能为文本容器添加 `word-wrap: break-word;`
### 💻 复现代码
```typescript
import {
PageContainer,
ProCard,
ProForm,
ProFormText,
ProFormTextArea,
} from '@ant-design/pro-components';
import React, { useState } from 'react';
const HomePage: React.FC = () => {
const [readonly, setReadonly] = useState(false);
const onClick = () => {
setReadonly(!readonly);
};
return (
readonly
);
};
export default HomePage;
```
### © 版本信息
- ProComponents 版本: ^2.4.4
- umi 版本: ^4.3.6
- 浏览器环境
- 开发环境 [e.g. mac OS]
### 🚑 其他信息
Contributor guide
Research direction
Start with the reproduction entry point in src/pages/Home/index.tsx and run the linked CodeSandbox using ProFormText and ProFormTextArea in readonly mode. Inspect how these components render their readonly text and verify that a long English word wraps within the container without overflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100