Open polaris-dxz opened 3 months ago
表单 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;
word-wrap: break-word;
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 ( <PageContainer> <button type="button" onClick={onClick}> readonly </button> <ProCard> <ProForm> <ProFormText name="text" readonly={readonly}></ProFormText> <ProFormTextArea name="textarea" readonly={readonly} ></ProFormTextArea> </ProForm> </ProCard> </PageContainer> ); }; export default HomePage;
🐛 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;
💻 复现代码
© 版本信息
🚑 其他信息