1.3.1 • Published 4 years ago
adv-form-render v1.3.1
基于ant-design-vue和form-render制作的 vue 版本
安装
npm i adv-form-render快速使用
<adv-form-render :schema="schema" @on-change="onChange" />API
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| schema | Object | ✓ | {} | schema 配置 |
| formData | Object | {} | 配置表单数据 | |
| on-change | Function | ✓ | () => {} | 数据更改回调函数 |
| on-validate | Function | () => {} | 表单输入校验回调 | |
| displayType | String | column | 设置表单横向排列或者纵向排序column/row | |
| showDescIcon | Boolean | false | 描述是否用 tooltip 展示。displayType为 row时建议设为 true | |
| readOnly | Boolean | false | 预览模式/可编辑模式 | |
| labelWidth | Number / String | 120 | 全局设置 label 长度(默认 120)。数字值单位为 px,也可使用'20%'/'2rem'等 |