3.0.2 • Published 10 months ago

vue-sticker-table v3.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

简介:基于 css sticky 特性实现的 Table 组件, 支持 Vue2.x / Vue3.x 演示:https://linpengteng.github.io/example/vue-sticker-table

安装

  yarn add vue-sticker-table@^2.0.0 # Vue2.x

  yarn add vue-sticker-table@^3.0.2 # Vue3.x

表格选项 - table

字段说明类型默认值
rowKey表格行 key 的取值string''
layout表格 table-layout'fixed' | 'auto''auto'
columns表格列选项具体项见下表-
scrolls设置横向或纵向滚动boolean | undefined | { x?: string | number, y?: string | number}-
customRow设置行属性, 例如: 行单击事件(record: Record\<string, any>, index: number) => { on?: Record\<string, Function> }-
immediate是否立刻执行 loadDatabooleantrue
paginate表格分页选项boolean | number | paginationfalse
loadData表格数据源加载函数(pagination: Pagination) => any-
handleData数据源自定义处理函数, 处理 loadData 返回的数据源(response: any) => { data: Array\, pageNo: number, totalPage: number, totalCount: number }-

表格列选项 - columns

字段说明类型默认值
title列头显示文字string-
dataIndex列数据在数据项中对应的 keystring-
scopedSlots列数据在数据项中自定义slot{ customRender: string }-
ellipsis单元格内容根据宽度自动省略boolean-
width表格列宽度string | number-
maxWidth表格列最大宽度string | number-
minWidth表格列最小宽度string | number-
fixed表格列固定方向'left' | 'right'-

表格滚动选项 - scrolls

字段说明类型默认值
x表格横向滚动string | number-
y表格竖向滚动, 当值为负值时,则为 window.innerHeight + ystring | number-

表格分页选项 - paginate

字段说明类型默认值
pageNo当前页数number1
pageSize每页条数number20
totalPage当前总页数number-
totalCount当前总条数number-
showPageSize显示的页码个数number6

表格卡槽选项 - slot

字段说明类型默认值
pagination分页卡槽, 自定义分页组件Component-

许可证

MIT

3.0.2

10 months ago

3.0.1

10 months ago

2.0.0

10 months ago

1.3.7

1 year ago

1.3.6

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.8

1 year 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

2 years ago

1.2.0

2 years ago