2.2.0 • Published 2 years ago

@hoc-element/table v2.2.0

Weekly downloads
15
License
MIT
Repository
github
Last release
2 years ago

@hoc-element/table

npm license

📦 基于 Webpack 5 构建,重构成 Vue 3.x,二次封装了 element-plus 库中的 table,通过配置文件的方式即可生成 table 表格, 无需再写大量的诸如 <el-xxx> 的模板,实现更高的自由度,旨在减少重复的操作,让开发变得更高效。

Live demo

Version

Screenshot

Environment Support

  • Vue 3.2.x

Install

npm install @hoc-element/table

# or

pnpm add @hoc-element/table

Quick Start

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import HocElTable from '@hoc-element/table'
import App from './App.vue'

createApp(App)
  .use(ElementPlus)
  .use(HocElTable)
  .mount('#app')

Changelog

Detailed changes for each release are documented in the release notes

Feature

  • 基于 Webpack 5 构建
  • 全面支持 Vue 3
  • 支持 JSON 序列化表格快速配置
  • 已内置 Pagination 分页
  • 支持自定义 prop 列名
  • 支持单元格内容自定义渲染 【见 单元格渲染配置说明
  • 支持自定义单元格 style 样式
  • 支持绑定自定义指令 directives
  • 支持绑定 element-plus 原生 TableEventsMethods
  • 支持 HeaderPagination 的显隐控制

单元格渲染配置说明

方法说明场景
---渲染单元格的 attrs.prop 对应的键值适用于直接显示 prop 的值场景
render渲染字符串适用于对默认 prop 的值做一些微处理的场景
renderHTML渲染指定的 DOM 元素适用于展示 Action,一般用在最后一列(目前只支持 el-button 的渲染,详见 Example)
renderComponent渲染组件适用于单元格内需要展示复杂内容的场景,详见 Example

Example

这是比较全的例子,几乎囊括了 API 的所有用法,源码戳这: Code

Deploy

见仓库 📥 hoc-element-table-build

2.2.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

2.0.0

2 years ago

0.2.6

3 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago