2.0.2 • Published 2 years ago
wzk-form-dialog v2.0.2
表单模态框
提供通过配置快速展示表单模态框,表单支持Element-UI中常用元素,如Input\Select\Radio等
主要思路是组件@hatech/form_dialog形成快速展示表单模态框的功能
使用说明
安装
npm install @hatech/form-dialog
初始化
// main.js
import Vue from 'vue'
import HatechFormDialog from '@hatech/form-dialog'
Vue.use(HatechFormDialog)
// or
// xxx.vue
import { HatechFormDialog } from '@hatech/form-dialog'
export default {
components: { HatechFormDialog }
}
使用示例
<hatech-form-dialog :config="config" :data="data"></hatech-form-dialog>
export default {
data() {
return {
data: {
...
},
config: {
type: 'drawer', // 'dialog'
dialog: {},
footer: {},
form: {},
columns: {}
}
}
}
}
参数
参数名 | 类型 | 描述 |
---|---|---|
data | Object | 数据源 |
config | Object | 配置 |
type | String | dialog:弹窗;drawer:抽屉 |
config.dialog | Object | 模态框属性配置,同hatech-dialog配置 |
config.footer | Object | 模态框底部按钮配置,同hatech-dialog |
config.form | Object | 表单属性配置,同hatech-form |
config.columns | Object | 表单项配置,同hatech-form |
插槽
before_form
: 表单前
after_form
:表单后
事件
模态框和表单事件都通过onEvent
事件透传
主题变量
未使用主题变量
依赖
依赖名 | 版本 | 链接 |
---|---|---|
hatech-web-component | 0.0.8 | http://git.hatech.com.cn:8088/hatech-web/hatech-web-template-component.git |
hatech-web-component-form | 0.0.3 | http://git.hatech.com.cn:8088/hatech-web/hatech-web-component-form.git |
hatech-web-component-dialog | 0.0.1 | http://git.hatech.com.cn:8088/hatech-web/hatech-web-component-dialog.git |
hatech-web-component-drawer | 0.0.1 | http://git.hatech.com.cn:8088/hatech-web/hatech-web-component-drawer.git |
作者/维护者
名称 | 联系方式 | 参与部分 |
---|---|---|
吴浩 | wuhaowh@hatech.com.cn | 初始版本开发 |
2.0.2
2 years ago