@9troisquarts/antd-form.ant-form 中文文档教程

发布于 3年前 浏览 26 项目主页 更新于 3年前

AntForm

AntForm 是一个组件,可让您轻松构建具有架构

bit

bit import 9troisquarts.antd-form/ant-form

yarn/npm

npm config set '@9troisquarts:registry' https://node.bit.dev

yarn add @ant-form/ant-form
OR
npm i @ant-form/ant-form

Usage/Examples

import AntForm from '@ant-form/ant-form';

function App() {
  return (
      <AntForm
        schema={[]}
        object={{}}
      />
  )
}

API Reference

AntForm Props

All AntDesign Form props 在 AntForm 上可用

ParameterTypeDescriptionDefault
actionsWrapperProps object Props of the div wrapping actions-
errors objectSet the current errors of the object (See example) -
extraActions Array\<React.Component> Extra actions displayed at the left of the submit button -
loadingbooleanSet the loading state of submit buttonfalse
objectobjectrequired Object used in form-
onChangefunction(changedField, allFields)Trigger when field updated-
onSubmitfunction(allFields)Triger after submitting the form, submit button will be hide if not provided-
readOnlyboolean Set the readonly state of the form false
 rowPropsRowPropsSet the props on rows surrounded each fields group-
 schema Schemarequired Set the schema used by the form-
submitButtonPropsButtonProps Submit button props -
submitTextstring Change the text in the submit buttonSave 

Available fields type

  • Rate
  • Select
  • String / Text
  • Number
  • Radio
  • Autocomplete
  • Upload
  • Checkbox / Checkboxes
  • Slider
  • Switch
  • Date
  • List

AntForm

AntForm is a component allowing you to easily build form with schema

bit

bit import 9troisquarts.antd-form/ant-form

yarn/npm

npm config set '@9troisquarts:registry' https://node.bit.dev

yarn add @ant-form/ant-form
OR
npm i @ant-form/ant-form

Usage/Examples

import AntForm from '@ant-form/ant-form';

function App() {
  return (
      <AntForm
        schema={[]}
        object={{}}
      />
  )
}

API Reference

AntForm Props

All AntDesign Form props is available on AntForm

ParameterTypeDescriptionDefault
actionsWrapperProps object Props of the div wrapping actions-
errors objectSet the current errors of the object (See example) -
extraActions Array\<React.Component> Extra actions displayed at the left of the submit button -
loadingbooleanSet the loading state of submit buttonfalse
objectobjectrequired Object used in form-
onChangefunction(changedField, allFields)Trigger when field updated-
onSubmitfunction(allFields)Triger after submitting the form, submit button will be hide if not provided-
readOnlyboolean Set the readonly state of the form false
 rowPropsRowPropsSet the props on rows surrounded each fields group-
 schema Schemarequired Set the schema used by the form-
submitButtonPropsButtonProps Submit button props -
submitTextstring Change the text in the submit buttonSave 

Available fields type

  • Rate
  • Select
  • String / Text
  • Number
  • Radio
  • Autocomplete
  • Upload
  • Checkbox / Checkboxes
  • Slider
  • Switch
  • Date
  • List
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文