ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.3k stars 1.36k forks source link

ProForm 报错 React does not recognize the `showCount` prop on a DOM element #8642

Open wowsummer opened 2 months ago

wowsummer commented 2 months ago

🐛 bug 描述

ProForm 报错 React does not recognize the showCount prop on a DOM element

📷 复现步骤

  1. ProForm 设置readonly、initialValues
  2. ProFormTextArea 添加 showCount,如:fieldProps={{ maxLength: 500, showCount: true }}
  3. 控制台报错了 image

🏞 期望结果

不要报错

💻 复现代码

<ProForm readonly initialValues={{ remark: 'test' }}>
    <ProFormTextArea
        label="备注"
        name="remark"
        fieldProps={{ maxLength: 500, showCount: true }}
     />
</ProForm>

© 版本信息

🚑 其他信息

github-actions[bot] commented 2 months ago

以下的 Issues 可能会帮助到你 / The following issues may help you