We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ant desgin ProFormDigit 使用string Mode 。输入一个长数字,例如。9999999999.123456789 当表单设置readonly 为true的时候。 数字会被裁减。
用下面的代码 输入数字。然后点击按钮改变只读
readonly和输入的数字保持一致。 因为是stringMode. 本就是为了解决长数字。 自动裁剪会破坏功能。
import { ProForm, ProFormDigit, ProFormGroup, } from '@ant-design/pro-components'; import { Switch } from 'antd'; import { useState } from 'react'; export const waitTime = (time: number = 100) => { return new Promise((resolve) => { setTimeout(() => { resolve(true); }, time); }); }; const Demo = () => { const [readonly, setReadonly] = useState(false); return ( <div style={{ padding: 24, }} > <Switch style={{ marginBlockEnd: 16, }} checked={readonly} checkedChildren="编辑" unCheckedChildren="只读" onChange={setReadonly} /> <ProForm readonly={readonly} name="validate_other" > <ProFormGroup label="数字类"> <ProFormDigit label="InputNumber" name="input-number" width="sm" fieldProps={ { precision:8, stringMode:true } } /> </ProFormGroup> </ProForm> </div> ); }; export default Demo;
ProComponents 版本: [5.17.3] 浏览器环境 版本 126.0.6478.127(正式版本) (arm64) 开发环境 [mac OS]
The text was updated successfully, but these errors were encountered:
5075113
No branches or pull requests
🐛 bug 描述
ant desgin ProFormDigit 使用string Mode 。输入一个长数字,例如。9999999999.123456789 当表单设置readonly 为true的时候。 数字会被裁减。
📷 复现步骤
用下面的代码 输入数字。然后点击按钮改变只读
🏞 期望结果
readonly和输入的数字保持一致。 因为是stringMode. 本就是为了解决长数字。 自动裁剪会破坏功能。
💻 复现代码
© 版本信息
ProComponents 版本: [5.17.3]
浏览器环境 版本 126.0.6478.127(正式版本) (arm64)
开发环境 [mac OS]
🚑 其他信息
The text was updated successfully, but these errors were encountered: