mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added formWrapper style
This commit is contained in:
parent
e5a0ce109d
commit
3bfd9b2117
@ -16,6 +16,8 @@ import {
|
|||||||
} from "antd"
|
} from "antd"
|
||||||
import HeadShake from "react-reveal/HeadShake"
|
import HeadShake from "react-reveal/HeadShake"
|
||||||
|
|
||||||
|
import "./index.less"
|
||||||
|
|
||||||
const allComponents = {
|
const allComponents = {
|
||||||
Input,
|
Input,
|
||||||
Button,
|
Button,
|
||||||
@ -169,8 +171,9 @@ export default class FormGenerator extends React.Component {
|
|||||||
|
|
||||||
renderValidationIcon() {
|
renderValidationIcon() {
|
||||||
if (this.props.renderLoadingIcon && this.state.validating) {
|
if (this.props.renderLoadingIcon && this.state.validating) {
|
||||||
return <Icons.LoadingOutlined spin style={{ marginTop: "7px" }} />
|
return <Icons.LoadingOutlined spin style={{ margin: 0 }} />
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,20 +379,22 @@ export default class FormGenerator extends React.Component {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <div
|
||||||
<div>
|
key={this.props.id}
|
||||||
<Form
|
id={this.props.id}
|
||||||
hideRequiredMark={this.props.hideRequiredMark ?? false}
|
className="formWrapper"
|
||||||
name={this.props.name ?? "new_form"}
|
>
|
||||||
onFinish={(e) => this.handleFinish(e)}
|
<Form
|
||||||
ref={this.ref}
|
hideRequiredMark={this.props.hideRequiredMark ?? false}
|
||||||
{...this.props.formProps}
|
name={this.props.name ?? "new_form"}
|
||||||
>
|
onFinish={(e) => this.handleFinish(e)}
|
||||||
{this.renderItems(this.props.items)}
|
ref={this.ref}
|
||||||
<Form.Item key="result" help={helpStatus} validateStatus={validateStatus} />
|
{...this.props.formProps}
|
||||||
</Form>
|
>
|
||||||
{this.renderValidationIcon()}
|
{this.renderItems(this.props.items)}
|
||||||
</div>
|
<Form.Item key="result" help={helpStatus} validateStatus={validateStatus} />
|
||||||
)
|
</Form>
|
||||||
|
{this.renderValidationIcon()}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
5
packages/app/src/components/formGenerator/index.less
Normal file
5
packages/app/src/components/formGenerator/index.less
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.formWrapper {
|
||||||
|
svg {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user