
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@pureadmin/table
Advanced tools
二次封装element-plus的Table,提供灵活的配置项
简体中文 | English
element-plus Table 的Table-column属性目前只能写在<template></template>模版里,这样不是很灵活,如果表格的column足够多,代码写、看起来很臃肿,但element-plus Virtualized Table 可配置性就很高,为了保持统一,我将Table二次封装并沿用了cellRenderer、headerRenderer这两个自定义渲染器,内置了可通过配置渲染的分页组件,当然还有一些额外的属性,让我们一起探索吧
🦾 灵活度高、强类型: 使用TSX语法编写,拥有强大的类型推导提示和灵活、方便的配置
⚡ 完全可摇树: 自带Tree-Shaking,只对引入的代码进行打包
🫶 代码零侵入: 保持Element-Plus Table 的所有属性、插槽、事件、方法的同时,提供更灵活的配置,而且还内置了可通过配置渲染的分页组件和加载动画以及表格自适应内容区高度等,当然 自定义命名空间 也不会受到任何影响
🌍 国际化友好: 内置三种精简的国际化(简体中文:zhCn、繁体中文:zhTw、英语: en),提供三种国际化配置方法,使其配置更灵活、方便。当然也可以结合 vue-i18n ,让表格自适应国际化语言
💚 SSR友好: 完全兼容Nuxt3
📡 可通过CDN引用: 同时支持jsdelivr和unpkg
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>
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"]
}
}
FAQs
二次封装element-plus的Table,提供灵活的配置项
The npm package @pureadmin/table receives a total of 2,873 weekly downloads. As such, @pureadmin/table popularity was classified as popular.
We found that @pureadmin/table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.