-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
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
fix(typings): correction FormLayout、Submit typings #182
Conversation
docs/API/Submit.md
Outdated
[ant-button](https://ant.design/components/button-cn/) | ||
继承 [next-button](https://fusion.design/component/basic/button#button) / | ||
[ant-button](https://ant.design/components/button-cn/#API) | ||
> 原有组件的 loading 属性会被拓展的 showLoading 属性所替代 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 扩展
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修正
> 主要用于控制Submit组件是否自动展示loading图标,要求SchemaForm的onSubmit回调必须返回Promise对象才会生效。 | ||
| 属性名称 | 属性描述 | 属性类型 | 默认值 | 可选值 | | ||
| ---- | ---- | ---- | --- | --- | | ||
| showLoading | 主要用于控制Submit组件是否自动展示loading图标,要求SchemaForm的onSubmit回调必须返回Promise对象才会生效。 | `boolean` | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFormLayout
应该是React.FunctionComponent<IFormLayoutProps>
另外createVirtualBox
返回的VirtualBox组件的props应该还有name和render属性(都可选), 目前麻烦手动加一下,以后会用泛型来重构掉。
const VirtualBox = ({ children, name: fieldName, render, ...props }) => (
<SchemaField
type="object"
name={fieldName}
x-component={name}
x-props={props}
x-render={render}
>
{children}
</SchemaField>
)
* fix(typings): correction FormLayout、Submit typings * docs(Submit): update API description * refactor: extract typings * docs(Submit): fix mistakes wording * refactor: modify FormLayout typings * refactor: modify FormLayout IFieldProps import
修正
FormLayout
、Submit
组件的类型声明Close #181