npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-sticker-table

v3.0.2

Published

基于 css sticky 特性实现的 Table 组件, 通过 columns 和 slot 灵活配置, 支持 Vue2.0 / Vue3.0

Downloads

11

Readme

简介:基于 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 | 是否立刻执行 loadData | boolean | true | | paginate | 表格分页选项 | boolean | number | pagination | false | | loadData | 表格数据源加载函数 | (pagination: Pagination) => any | - | | handleData | 数据源自定义处理函数, 处理 loadData 返回的数据源 | (response: any) => { data: Array<any>, pageNo: number, totalPage: number, totalCount: number } | - |

表格列选项 - columns

|字段|说明|类型|默认值| |:---|:---|:---:|:---:| | title | 列头显示文字 | string | - | | dataIndex | 列数据在数据项中对应的 key | string | - | | 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 + y | string | number | - |

表格分页选项 - paginate

|字段|说明|类型|默认值| |:---|:---|:---:|:---:| | pageNo | 当前页数 | number | 1 | | pageSize | 每页条数 | number | 20| | totalPage | 当前总页数 | number | - | | totalCount | 当前总条数 | number | - | | showPageSize | 显示的页码个数 | number | 6 |

表格卡槽选项 - slot

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

许可证

MIT