1.1.1 • Published 4 years ago

zh-elm-ui v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

zh-elm-ui

基于 elementUI 的二次封装,包括表格、表单、分页等

安装

推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用。

 npm i zh-elm-ui -S

引入 zh-elm-ui

在 main.js 写入以下内容:

import Vue from 'vue'
import ElmUI from 'zh-elm-ui'
import App from './App.vue'
import 'zh-elm-ui/lib/zh-elm-ui.css'

Vue.use(ElmUI)

new Vue({
  el: '#app',
  render: (h) => h(App),
})

本地预览

yarn install

运行

yarn serve

elm-table 表格文档

API

参数说明类型默认值
tableConfig表格配置Object
tableColumns表格子项Array同原生
tableOperations表格操作项Object
pageParams分页参数Object
dataPropsmanualTrigger 为 false 时,接口返回数据格式时获取值Object{records: 'records',total: 'total',}
dataListmanualTrigger 为 true 时,自定义表格数据Array[]

tableConfigs props

参数说明类型默认值
operationAlign操作项水平对齐方式String--
operationWidth操作项宽度String
tableDataParams初始化数据入参Object
manual是否自定义数据函数Booleanfalse
hidePagination隐藏分页Booleanfalse
multiSelect表格多选Booleanfalse

tableOperations props

参数说明类型
options操作配置Object
list操作列Array

options props

参数说明类型
width操作列宽度String
其他同原生--

list props

参数说明类型
text按钮文本String
type按钮类型String
isShow是否隐藏和显示Boolean, Function
handler按钮方法类Function

tableConfigs events

事件名说明类型参数
getTableData获取数据的函数Function
selectChange表格多选方法,multiSelect 为 trueFunction
checkSelectEnable是否禁止选择,multiSelect 为 trueFunction

elm-form 表单文档

API

参数说明类型默认值
formConfig表单配置Object
formColumns表单项Object

formConfigs props

参数说明类型默认值
rowLayout表单布局Object
labelWidth表单项宽度String同原生
size表单尺寸大小String同原生

formColumns props

参数说明类型可选值默认值
type表单类型Stringselect、radio、checkbox--
component动态表单类型String除上述之外的表单类型--
label表单项名称String''--
\$attrs组件 props 的继承Object--{}
colLayout子项布局,优先于 rowLayoutObject----
labelWidthlabel 的宽度String----

event

事件名说明类型参数
on-submit提交事件Function表单返回值
on-rest重置事件Function重置表单
1.1.1

4 years ago

1.0.2

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago