New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@pureadmin/table

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pureadmin/table

二次封装element-plus的Table,提供灵活的配置项

latest
Source
npmnpm
Version
3.3.0
Version published
Weekly downloads
2.6K
-17.12%
Maintainers
1
Weekly downloads
 
Created
Source

@pureadmin/table

二次封装element-plus的Table,提供灵活的配置项

NPM version NPM Downloads

简体中文 | English

预览地址
更多示例,基本所有的用法这里都有

🤔 开发初衷

element-plus TableTable-column属性目前只能写在<template></template>模版里,这样不是很灵活,如果表格的column足够多,代码写、看起来很臃肿,但element-plus Virtualized Table 可配置性就很高,为了保持统一,我将Table二次封装并沿用了cellRendererheaderRenderer这两个自定义渲染器,内置了可通过配置渲染的分页组件,当然还有一些额外的属性,让我们一起探索吧

🚀 特性

🦾 灵活度高、强类型: 使用TSX语法编写,拥有强大的类型推导提示和灵活、方便的配置
完全可摇树: 自带Tree-Shaking,只对引入的代码进行打包
🫶 代码零侵入: 保持Element-Plus Table 的所有属性、插槽、事件、方法的同时,提供更灵活的配置,而且还内置了可通过配置渲染的分页组件和加载动画以及表格自适应内容区高度等,当然 自定义命名空间 也不会受到任何影响
🌍 国际化友好: 内置三种精简的国际化(简体中文:zhCn、繁体中文:zhTw、英语: en),提供三种国际化配置方法,使其配置更灵活、方便。当然也可以结合 vue-i18n ,让表格自适应国际化语言
💚 SSR友好: 完全兼容Nuxt3
📡 可通过CDN引用: 同时支持jsdelivrunpkg

📦 安装

npm install @pureadmin/table
# or
yarn add @pureadmin/table
# or
pnpm add @pureadmin/table

📡 CDN

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@pureadmin/table/dist/style.css" />
<script src="//cdn.jsdelivr.net/npm/@pureadmin/table"></script>
<!-- or -->
<link rel="stylesheet" href="//unpkg.com/@pureadmin/table/dist/style.css" />
<script src="//unpkg.com/@pureadmin/table"></script>

⚙️ 用法

局部注册(单文件)

import "@pureadmin/table/dist/style.css";
import { PureTable } from "@pureadmin/table";

<pure-table locale="zhCn" :data="dataList" :columns="columns" :pagination="pagination"></pure-table>

全局注册(main.ts)

import { createApp } from "vue";
import App from "./App.vue";

import "@pureadmin/table/dist/style.css";
import PureTable from "@pureadmin/table";

const app = createApp(App);

app.use(PureTable, { locale: "zhCn" }).mount("#app");

点击查看按需、全局、自定义命名空间、nuxt3以及Html文件引入的用法示例

🔮 Volar支持

如果您在使用 Volar,那么可以在 tsconfig.json 中配置 compilerOptions.types 来指定全局组件类型(尤其是全局注册时要想获得类型提示就需要加上下面配置)

// tsconfig.json
{
  "compilerOptions": {
    // ...
    "types": ["@pureadmin/table/volar"]
  }
}

许可证

MIT © 2022-present, pure-admin

Keywords

@pureadmin/table

FAQs

Package last updated on 30 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts