# el-dialog-form
**Repository Path**: wjs0509/el-dialog-form
## Basic Information
- **Project Name**: el-dialog-form
- **Description**: 基于element-ui封装的弹窗式表单组件
- **Primary Language**: Unknown
- **License**: MPL-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 4
- **Created**: 2023-01-10
- **Last Updated**: 2023-01-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# el-dialog-form
#### 介绍
基于element-ui封装的弹窗式表单组件
#### git地址
[https://gitee.com/chenfency/el-dialog-form.git](https://gitee.com/chenfency/el-dialog-form.git)
#### 更新日志
### 2021-8-12
* 版本1.0.0
### 2021-8-17
* 优化组件,兼容element原组件所有Attributes及Events
### 2021-9-9
* 新增tip提示
#### 安装教程
1. npm install el-dialog-form --save
#### 使用说明
1. 插件基于element-ui开发:[element-ui文档](https://element.eleme.cn/#/zh-CN/component/installation)
2. 安装前请先确保已经安装element-ui
3. npm install element-ui --save
4. 验证器文档地址:[https://github.com/yiminghe/async-validator](https://github.com/yiminghe/async-validator)
#### 参数说明
| 参数名 | 说明 | 类型 | 可选值 | 默认值 |
|---------|-------------|---------|------|-------|
| visible | 是否显示dialog | Boolean | true | false |
| title | 标题 | String | - | - |
| width | 表单宽度 | String | - | - |
| items | 表单项,详细见下方说明 | Array | - | [] |
| form | 初始表单值 | Object | - | {} |
#### items参数说明
| 参数名 | 说明 | 类型 | 可选值 | 默认值 |
|----------|--------------|---------|------|-------|
| type | 表单项的类型,必填 | String | input/input-number/radio-group/checkbox-group/select/switch/time-picker/date-picker/slot | - |
| span | el-col的span值 | Number | - | 20 |
| label | 表单项label | String | - | - |
| prop | 表单项key | String | - | - |
| tip | 文字提示 | String | - | - |
| rules | 表单验证规则,验证器文档地址:https://github.com/yiminghe/async-validator | Array | - | - |
| hidden | 隐藏条件函数,返回true/false来控制显示隐藏 | Function | - | - |
| disabled | 禁用条件函数,返回true/false来控制禁用启用 | Function | - | - |
| options | 选择项数组,仅type等于radio-group/checkbox-group/select生效,详细见下方说明 | Array | - | - |
| on | 事件监听,key->value形式,key值同element-ui的Events,value为一个函数,详见element-ui文档 | Object | - | - |
| attrs | 属性参数,key->value形式,key值同element-ui的Attributes,详见element-ui文档 | Object | - | - |
#### options参数说明
| 参数名 | 说明 | 类型 | 可选值 | 默认值 |
|-------|----------|--------|-----|-----|
| label | 显示的label | String | - | - |
| value | 选中的value | Any | - | - |
#### type==='slot'
绑定值为:form
#### 示例代码
```
打开表单
```