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

element-plus-table-pro

v2.4.12

Published

element-plus-table插件 此版本号同步element-plus版本号

Downloads

9

Readme

仿照 antd pro 的搜索表格 对 element-plus-table 进行二次封装。支持多表头,完全兼容官方文档的所有属性,事件,插槽,方法。与官方版本同步更新

【elementPlus 表格扩展插件】 https://www.bilibili.com/video/BV1QN4y1s7gf/?share_source=copy_web&vd_source=d89bee5685527bb00d6328b67f985401

  • [x] 刷新表格
  • [x] 切换表格密度
  • [x] 设置列 显示隐藏 排序 左右固定 重置
  • [x] 全屏

快速上手

yarn add element-plus-table-pro
import { BaseTable } from "element-plus-table-pro";
import "element-plus-table-pro/dist/style.css";

你可以完全把 BaseTable 组件当成 el-table 组件来用

前提项目里必须安装 element-plus 才可以正常使用

参考:https://element-plus.gitee.io/zh-CN/guide/quickstart.html

完整代码

<template>
  <BaseTable :data="tableData" align="center" @refreshTable="refreshTable">
    <template #headerLeft>
      <el-button type="primary">新增用户</el-button>
      <el-button>批量删除用户</el-button>
    </template>
    <el-table-column type="selection" width="55" />

    <el-table-column prop="date" label="Date" width="150" fixed="left">
    </el-table-column>
    <el-table-column prop="date2" label="date2" width="150" fixed="left">
    </el-table-column>
    <el-table-column prop="date3" label="date3" width="150" fixed="left">
    </el-table-column>
    <el-table-column prop="date4" label="date4" width="150" fixed="left">
    </el-table-column>
    <el-table-column prop="date5" label="date5" width="150" fixed="left">
    </el-table-column>
    <el-table-column type="index" width="55" label="" fixed="right" />
    <el-table-column label="Delivery Info" fixed="left">
      <el-table-column prop="name" label="Name" width="120" />
      <el-table-column label="Address Info">
        <el-table-column prop="state" label="State" width="120">
          <template #header="scope"
            ><span style="color: red"> {{ scope.column.property }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="city" label="City" width="120" />
        <el-table-column prop="address" label="Address" />
        <el-table-column prop="zip" label="Zip" width="120" />
      </el-table-column>
    </el-table-column>
    <el-table-column fixed="right" label="Operations" width="120">
      <template #default="scope">
        <el-button
          link
          type="primary"
          size="small"
          @click="test(scope)"
          v-if="scope"
          >查看{{ scope.$index }}</el-button
        >
        <el-button link type="primary" size="small">编辑</el-button>
      </template>
    </el-table-column>
  </BaseTable>
</template>
<script setup lang="ts">
import BaseTable from "@/components/baseTable/index.vue";

const tableData = [
  {
    date: "2016-05-03",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
  {
    date: "2016-05-02",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
  {
    date: "2016-05-04",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
  {
    date: "2016-05-01",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
  {
    date: "2016-05-08",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
  {
    date: "2016-05-06",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
  {
    date: "2016-05-07",
    name: "Tom",
    state: "California",
    city: "Los Angeles",
    address: "No. 189, Grove St, Los Angeles",
    zip: "CA 90036",
    date2: "date2",
    date3: "date3",
    date4: "date4",
    date5: "date5",
  },
];

const refreshTable = () => {
  console.log("刷新表格");
};

const test = (scope: any) => {
  console.log(scope);
};
</script>

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