# VCreateForm **Repository Path**: chengyehua/vcreate-form ## Basic Information - **Project Name**: VCreateForm - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-18 - **Last Updated**: 2025-10-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @formCreate/antV v1.0.16 ## Installation Using npm: ```shell $ npm i --save cheng-create-form-antv $ npm i -g pnpm $ pnpm i --save cheng-create-form-antv ``` Usage: ```ts import { createApp } from "vue"; import App from "./App.vue"; import CreateFormAntV from "cheng-create-form-antv"; const app = createApp(App); app.use(CreateFormAntV); ``` Page: ```ts ``` ## API ### CreateFormAntV #### Form Props | Name | Type | Default | Description | | ---------- | ------- | ------- | --------------------------------------------------- | | formConfig | Object | - | 表单配置项 | | fields | Array | - | 表单项配置 | | formId | String | - | 表单 id | | search | Boolean | - | 是否为搜索,如果为 true时,formConfig:{layout:"inline"}。 | #### formConfig | Name | Type | Default | Description | | -------------------- | ------- | ---------- | --------------------------------------- | | colon | Boolean | true | 是否显示 label 后面的冒号 | | disabled | Boolean | false | 是否禁用表单 | | hideRequiredMark | Boolean | false | 是否隐藏必填标记 | | labelAlign | String | left | label 对齐方式 | | labelCol | Object | - | label 布局 | | labelWrap | Boolean | false | label 是否换行 | | layout | String | horizontal | 表单布局 | | model | Object | - | 表单数据 | | name | String | - | 表单名称 | | noStyle | Boolean | false | 是否隐藏样式 | | rules | Object | - | 表单校验规则 | | scrollToFirstError | Object | - | 首次校验失败时滚动到第一个错误字段 | | validateOnRuleChange | Boolean | true | 当 rules 属性发生变化时是否触发表单校验 | | validateTrigger | String | blur | 校验触发时机 | | wrapperCol | Object | - | wrapper 布局 | #### fields | Name | Type | Default | Description | | ------------- | -------- | ------- | -------------------- | | el | String | - | 表单项类型 | | key | String | - | 表单项 key | | label | String | - | 表单项 label | | props | Object | - | 表单项 props | | col | Object | - | 表单项布局 | | formItemProps | Object | - | 表单项 formItemProps | | rules | Array | - | 表单项校验规则 | | slot | Boolean | false | 是否使用插槽 | | hidden | Boolean | false | 是否隐藏 | | emit | Array | - | 表单项事件 | | customRender | Function | - | 自定义渲染 | | on | Object | - | 表单项事件 | | renderSlots | Object | - | 表单项插槽 | | defaultValue | any | - | 表单项默认值 | | readonlyProps | Object | - | 表单项只读属性 | #### layout 配置:参考 Ant Design Vue Form API ## License MIT