1 | # vxe-table
|
2 |
|
3 | [简体中文](README.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
|