1 | # vxe-table
|
2 |
|
3 | 简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md)
|
4 |
|
5 | [![star](https://gitee.com/xuliangzhan_admin/vxe-table/badge/star.svg?theme=gvp)](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
6 | [![npm version](https://img.shields.io/npm/v/vxe-table.svg?style=flat-square)](https://www.npmjs.com/package/vxe-table)
|
7 | [![npm build](https://travis-ci.com/x-extends/vxe-table.svg?branch=master)](https://travis-ci.com/x-extends/vxe-table)
|
8 | [![npm downloads](https://img.shields.io/npm/dt/vxe-table.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-table)
|
9 | [![issues](https://img.shields.io/github/issues/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/issues)
|
10 | [![issues closed](https://img.shields.io/github/issues-closed/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/issues?q=is%3Aissue+is%3Aclosed)
|
11 | [![pull requests](https://img.shields.io/github/issues-pr/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/pulls)
|
12 | [![pull requests closed](https://img.shields.io/github/issues-pr-closed/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/pulls?q=is%3Apr+is%3Aclosed)
|
13 | [![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
|
14 |
|
15 | 一个基于 [vue](https://www.npmjs.com/package/vue) 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...
|
16 |
|
17 | * 设计理念
|
18 | * 面向现代浏览器,高效的简洁 API 设计
|
19 | * 模块化表格、按需加载、扩展接口
|
20 | * 为单行编辑表格而设计,支持增删改查及更多扩展,强大的功能的同时兼具性能
|
21 |
|
22 | ## QQ 交流群
|
23 |
|
24 | ![qq](https://gitee.com/xuliangzhan_admin/vxe-table/raw/master/public/static/donation/qq.png)
|
25 |
|
26 | ## 浏览器支持
|
27 |
|
28 | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png)
|
29 | --- | --- | --- | --- | --- | --- |
|
30 | 11+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |
|
31 |
|
32 | ## 功能点
|
33 |
|
34 | * [x] 基础表格
|
35 | * [x] 高级表格
|
36 | * [x] 斑马线条纹
|
37 | * [x] 多种边框
|
38 | * [x] 单元格样式
|
39 | * [x] 列宽拖动
|
40 | * [x] 最大高度
|
41 | * [x] 自适应宽高
|
42 | * [x] 固定列
|
43 | * [x] 多级表头
|
44 | * [x] 表尾数据
|
45 | * [x] 高亮行或列
|
46 | * [x] 序号
|
47 | * [x] 单选框
|
48 | * [x] 复选框
|
49 | * [x] 下拉选项
|
50 | * [x] 开关
|
51 | * [x] 排序
|
52 | * [x] 多字段组合排序
|
53 | * [x] 筛选
|
54 | * [x] 合并单元格
|
55 | * [x] 合并表尾
|
56 | * [x] 导入/导出/打印
|
57 | * [x] 显示/隐藏列
|
58 | * [x] 加载中
|
59 | * [x] 格式化内容
|
60 | * [x] 自定义插槽 - 模板
|
61 | * [x] 快捷菜单
|
62 | * [x] 展开行
|
63 | * [x] 分页
|
64 | * [x] 表单
|
65 | * [x] 工具栏
|
66 | * [x] 下拉容器
|
67 | * [x] 虚拟列表
|
68 | * [x] 虚拟树
|
69 | * [x] 增删改查
|
70 | * [x] 数据校验
|
71 | * [x] 数据代理
|
72 | * [x] 键盘导航
|
73 | * [x] 弹窗
|
74 | * [x] 渲染器
|
75 | * [x] 虚拟滚动
|
76 | * [x] 虚拟合并
|
77 | * [x] (pro) 单元格区域选取
|
78 | * [x] (pro) 单元格复制/粘贴
|
79 | * [x] (pro) 单元格查找和替换
|
80 |
|
81 | ## 安装
|
82 |
|
83 | 版本:[vue](https://www.npmjs.com/package/vue) 2.6.x, 依赖库:[xe-utils](https://www.npmjs.com/package/xe-utils)
|
84 |
|
85 | ```shell
|
86 | npm install xe-utils vxe-table@3
|
87 | ```
|
88 |
|
89 | Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
|
90 |
|
91 | ### npm
|
92 |
|
93 | ```javascript
|
94 | import Vue from 'vue'
|
95 | import 'xe-utils'
|
96 | import VXETable from 'vxe-table'
|
97 | import 'vxe-table/lib/style.css'
|
98 |
|
99 | Vue.use(VXETable)
|
100 | ```
|
101 |
|
102 | ### CDN
|
103 |
|
104 | ```HTML
|
105 | <!-- 引入样式 -->
|
106 | <link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
|
107 | <!-- 引入脚本 -->
|
108 | <script src="https://unpkg.com/xe-utils"></script>
|
109 | <script src="https://unpkg.com/vxe-table"></script>
|
110 | <!-- 建议使用 CDN 方式引入的用户在链接地址上锁定版本,避免受到非兼容性更新的影响 -->
|
111 | ```
|
112 |
|
113 | ## 示例
|
114 |
|
115 | ```html
|
116 | <template>
|
117 | <div>
|
118 | <vxe-table :data="tableData">
|
119 | <vxe-column type="seq" title="Seq" width="60"></vxe-column>
|
120 | <vxe-column field="name" title="Name"></vxe-column>
|
121 | <vxe-colgroup title="Group1">
|
122 | <vxe-column field="sex" title="Sex"></vxe-column>
|
123 | <vxe-column field="address" title="Address"></vxe-column>
|
124 | </vxe-colgroup>
|
125 | </vxe-table>
|
126 | </div>
|
127 | </template>
|
128 |
|
129 | <script>
|
130 | export default {
|
131 | data () {
|
132 | return {
|
133 | tableData: [
|
134 | { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', address: 'Shenzhen' },
|
135 | { id: 10002, name: 'Test2', role: 'Test', sex: 'Man', address: 'Guangzhou' },
|
136 | { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', address: 'Shanghai' }
|
137 | ]
|
138 | }
|
139 | }
|
140 | }
|
141 | </script>
|
142 | ```
|
143 |
|
144 | ## 文档
|
145 |
|
146 | 💡 [使用指南](https://github.com/xuliangzhan/vxe-table-demo)
|
147 | 👉 [查看演示](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/base/basic) [👀备用地址](https://x-extends.github.io/vxe-table/#/table/base/basic)
|
148 | 👉 [查看文档](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api) [👀备用地址](https://x-extends.github.io/vxe-table/#/table/api)
|
149 |
|
150 | ## 运行项目
|
151 |
|
152 | 安装依赖
|
153 |
|
154 | ```shell
|
155 | npm install
|
156 | ```
|
157 |
|
158 | 启动本地调试
|
159 |
|
160 | ```shell
|
161 | npm run serve
|
162 | ```
|
163 |
|
164 | 编译打包,生成编译后的目录:lib
|
165 |
|
166 | ```shell
|
167 | npm run lib
|
168 | ```
|
169 |
|
170 | ## License
|
171 |
|
172 | [MIT](LICENSE) © 2019-present, Xu Liangzhan
|