1.3.6 • Published 2 years ago

vue-el-custom-component v1.3.6

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

越南助贷管理平台组件库

安装

npm install vue-el-custom-component
yarn add vue-el-custom-component

使用

  • 全局注册
import vueCustomComponent from 'vue-el-custom-component'
import 'vue-el-custom-component/lib/index.css';
Vue.use(vueCustomComponent);
  • 局部注册
import {SearchForm,TableDom,tableMixin} from 'vue-el-custom-component'
import 'vue-el-custom-component/lib/index.css';
export default {
    components:{TableDom,SearchForm},
    mixins: [tableMixin],
}

功能描述

SearchForm

SearchForm Attributes

参数说明类型可选值默认值
v-model表单数据对象object
search-config表单配置对象object
search-config内部参数
inline行内表单模式booleanfalse
title页面-标题string
size用于控制该表单内组件的尺寸stringmedium / small / mini—small—
labelWidth表单域标签的宽度string
fields表单域 model 字段相关配置array
btnList表单域自定义功能按钮配置array

SearchForm Methods

方法名说明参数
onSearch回调函数,用于表格筛选条件
onReset回调函数,初始化SearchForm/TableDom数据
onSearchHandle回调函数,自定义table相关功能操作,通过回调参数 type 字段匹配对应自定义功能操作Function(options : Object)

search-config 配置案例

{
        inline: false,
        title: 'Page-模板',
        size: 'small',
        labelWidth: '125px',
        fields: [
            { type: 'input', label: '名称', prop: 'name',maxlength:20 },
            { type: 'time', label: '时间', prop: 'time' },
            { type: 'date', label: '日期', prop: 'date' },
            { type: 'dateTime', label: '日期时间', prop: 'dateTime' },
            {
                type: 'daterange', label: '日期区间', prop: 'daterange', pickerOptions: {
                    disabledDate: (time) => {
                        console.log('pickerOptions', time)
                        return time.getTime() > Date.now() - 3600 * 1000 * 24
                    }
                }
            },
            {
                type: 'select', label: '下拉', prop: 'select',
                options: [{ label: 'a', value: 1 }, { label: 'b', value: 2 }]
            },
            {
                type: 'select', label: '下拉多选', prop: 'copyMultiple', multiple: true,
                options: [{ label: 'a', value: 1 }, { label: 'b', value: 2 }]
            }
        ],
        # 国际化配置
        searchBtn: { search: '查询', reset: '重置' },  
        # 自定义按钮功能配置,根据对应 type 匹配功能 
        btnList: [{ label: '新增', type: 'add', options: { title: '新增数据', width: '620px' } }]
    }
<search-form
      v-model="searchData"
      :search-config="searchConfig"
      @onSearch="onSearch"
      @onReset="onReset"
      @onSearchhandle="onSearchHandle"
/>
export default {
    methods: {
            onSearchHandle ({ type, options }) {
    const Handle = {
     add:()=>{},
     delete:()=>{},
    }
               Handle[type]()
            }
    }
}

TableDom

EditForm

Gitlab地址

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

3 years ago

1.2.9

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

0.1.0

3 years ago