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 🙏

© 2025 – Pkg Stats / Ryan Hefner

z-custom-table

v0.0.7

Published

表格组件

Readme

表格实例- 参考配置

<template>
 <div>
   <z-customtable  v-bind="tableSetAttr">
     <template v-for="item in tableSetAttr.tableAttr.columns">
       <el-table-column
         :fixed="item.fixed"
         :prop="item.dataKey"
         :sortable="item.sortable"
         :label="item.title"
         :width="item.width"
       />
     </template>
   </z-customtable>
 </div>
</template>


<style lang="scss"></style>

表格实例- 启动虚拟表格/滚动条跟随

<template>
 <div>

   <z-customtable ref="dom" class="custom" :tableData="data" :requestLoading="requestLoading" v-bind="tableSetAttr">
     <template v-for="item in tableSetAttr.tableAttr.columns">
       <el-table-column
         v-if="!['action'].includes(item.dataKey)"
         :fixed="item.fixed"
         :prop="item.dataKey"
         :sortable="item.sortable"
         :label="item.title"
         :width="item.width"
       ></el-table-column>
     </template>
     <!-- <el-table-column prop="name" label="Name" width="120" />
     <el-table-column prop="state" label="State" width="120" />
     <el-table-column prop="city" label="City" width="120" />
     <el-table-column prop="address" label="Address" width="600" />
     <el-table-column prop="zip" label="Zip" width="120" />
     <el-table-column fixed="right" label="action" width="120">
       <template #default >
         <el-button link type="primary" size="small" >Detail</el-button>
         <el-button link type="primary" size="small">Edit</el-button>
       </template>
     </el-table-column> -->
     <el-table-column prop="action" label="action" width="120">
       <template #default>
         <el-button link type="primary" size="small">Detail</el-button>
         <el-button link type="primary" size="small">Edit</el-button>
       </template>
     </el-table-column>
   </z-customtable>
 </div>
</template>


<style lang="scss">
.custom {
}
</style>

表格属性

| 属性 | 描述 | 备注 | | --------------- | :------------ | :----------: | | tableData | 表格数据 | Array | | requestLoading | 加载 | boolean | | onRequest | 操作请求 promise | (paginationOption) => Promise| | showPage | 显示分页 | boolean | | virtualized | 开启虚拟化表格 | boolean | | stickyed | 横向滚动条随屏 | boolean| | tableEvent | 表格事件 | 同element-plus | | tableAttr | 表格配置 | 同element-plus , virtualized: true时宽度受tableAttr.width限制 参考实例| | paginationOption | 分页配置 | 同element-plus | | paginationEvent | 分页事件配置 | 同element-plus |

ref defineExpose 方法

| 方法 | 描述 | 备注 | | --------------- | :------------ | :----------: | | emitPageDefault | 设置 paginationOption | Array |

ref defineExpose 属性

| 方法 | 描述 | 备注 | | --------------- | :------------ | :----------: | | paginationOptionConfig | 设置 paginationOption | Array | | tableEventConfig | 表格事件 | Array |