2.0.2 • Published 2 years ago

wzk-form-dialog v2.0.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

表单模态框

提供通过配置快速展示表单模态框,表单支持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: {}
        }
      }
    }
  }

参数

参数名类型描述
dataObject数据源
configObject配置
typeStringdialog:弹窗;drawer:抽屉
config.dialogObject模态框属性配置,同hatech-dialog配置
config.footerObject模态框底部按钮配置,同hatech-dialog
config.formObject表单属性配置,同hatech-form
config.columnsObject表单项配置,同hatech-form

插槽

before_form: 表单前

after_form:表单后

事件

模态框和表单事件都通过onEvent事件透传

主题变量

未使用主题变量

依赖

依赖名版本链接
hatech-web-component0.0.8http://git.hatech.com.cn:8088/hatech-web/hatech-web-template-component.git
hatech-web-component-form0.0.3http://git.hatech.com.cn:8088/hatech-web/hatech-web-component-form.git
hatech-web-component-dialog0.0.1http://git.hatech.com.cn:8088/hatech-web/hatech-web-component-dialog.git
hatech-web-component-drawer0.0.1http://git.hatech.com.cn:8088/hatech-web/hatech-web-component-drawer.git

作者/维护者

名称联系方式参与部分
吴浩wuhaowh@hatech.com.cn初始版本开发