Closed senjyouhara closed 2 years ago
还有个问题 在table-editable里的EditableCell
方法
if (eleProps) {
childNode = (
<FormItem
label={title}
showLabel={false}
colon={false}
name={dataIndex}
{...eleProps}
/>
);
}
这里showLabel 我看了formItem里是没这个字段相关的代码 是否还未实现 并且这个字段会抛出一个错误
React does not recognize the `showLabel` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom
attribute, spell it as lowercase `showlabel` instead. If you accidentally passed it from a parent component, remove it from the
DOM element.
showLabel 属性没有了,忘记删除了。
FormItem 的 pattern 已添加,将@ra-lib/admin 升级到 0.1.2版本即可。
使用方法: pattern={[/^1\d{10}$/, '请输入正确的账号']}
可以了 感谢更新
建议form-item组件加个pattern字段,毕竟大多数效验基本上都可以一个正则搞定的,加这个字段就避免了经常性书写rules字段