0.1.6 • Published 2 years ago

element-table3 v0.1.6

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

简介

使用 vue3element-plus 实现 可通过配置json文件生成table表格

功能

1.根据配置文件动态生成表格和分页
2.通过配置显示序号和复选框
3.支持自定义插槽对表格文本进行操作
4.分页处理、多行操作
5.表格行合并等

接口

表格参数

参数说明类型可选值默认值
tableData表格数据Array\
tableConfig表格配置项Object
handleRowClick当某一行发生变化的时候会触发Function()
handleRowDbClick当某一行被双击时会触发该事件Function()
total总条目数Number
current当前页数Number
pageSize每页显示条目个数Number

表格事件

事件名称说明参数
tableChange翻页时候触发当前页,当前页条数
tableConfig参数
参数说明类型可选值默认值
parameter配置相关Object
parameter.selection是否显示复选框Booleantrue/falsefalse
parameter.index是否显示序号Booleantrue/falsefalse
parameter.pagination是否显示分页Booleantrue/falsefalse
parameter.defaultSort默认排序规则Object{ prop: '', order: 'descending' }
parameter.extendTable表格配置扩展项,同el-tableObject{'header-cell-style': { background: '#18A058', color: 'rgba(0, 0, 0, 0.85)', padding: '8px 0px' },...}
parameter.extendPagination分页配置扩展项,同el-paginationObject{'paginationAlign': 'center','page-sizes': 10, 20,...}
columns表格列Array\
columns0.prop同接口字段String
columns0.label表头展示文字String
columns0.width列的宽度Number
columns0.align列是否居中Stringleft/center/rightleft
columns0.formatterFun格式化列的值function(row, column, cellValue, index)
columns0.sortable支持全局排序,填入custom即可Stringcustom
columns0.slotName具名插槽名称String
columns0.component引入的外部组件
columns0.extendTableColumn表格列配置扩展项,同el-table-columnObject{'class-name': 'amount-2',...}
0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago