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
@nutui/nutui-react-taro
2.8.6
weapp
https://codesandbox.io/p/sandbox/nutui-react-2x-demo-fg4vxd?file=/src/App.tsx
源码地址:https://github.com/jdf2e/nutui-react/blob/next/src/packages/formitem/types.ts
export interface FormItemRule extends FormItemRuleWithoutValidator { validator?: ( ruleCfg: FormItemRuleWithoutValidator, value: string ) => boolean | string | Promise<boolean | string> }
validator 中参数 value 不该写死 string,哪怕 any 类型也比 string 强啊
validator
value
string
any
可以参考 react-component 的 form 类型设计 https://github.com/react-component/field-form/blob/master/src/interface.ts
validator 回调参数类型错误
validator 回调参数类型不准确
No response
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
NutUI React 包名
@nutui/nutui-react-taro
NutUI React 版本号
2.8.6
平台
weapp
重现链接
https://codesandbox.io/p/sandbox/nutui-react-2x-demo-fg4vxd?file=/src/App.tsx
重现步骤
源码地址:https://github.com/jdf2e/nutui-react/blob/next/src/packages/formitem/types.ts
validator
中参数value
不该写死string
,哪怕any
类型也比string
强啊可以参考 react-component 的 form 类型设计 https://github.com/react-component/field-form/blob/master/src/interface.ts
期望的结果是什么?
validator 回调参数类型错误
实际的结果是什么?
validator 回调参数类型不准确
环境信息
No response
其他补充信息
No response
The text was updated successfully, but these errors were encountered: