1 | # vxe-table
|
2 |
|
3 | [简体中文](README.md) | [繁體中文](README.zh-TW.md) | English
|
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 | A [vue](https://www.npmjs.com/package/vue) based PC form component, support add delete change check, virtual tree, column drag and drop, lazy loading, shortcut menu, data verification, print export, form rendering, custom template, renderer, JSON configuration...
|
16 |
|
17 | * Design concept
|
18 | * Efficient and concise API design for modern browsers.
|
19 | * Modular tables, on-demand loading.
|
20 | * Designed for single row table editing, supports addition, deletion, modification and query as well as more expansion, with powerful functions and performance at the same time.
|
21 |
|
22 | * Plan
|
23 | * [x] ~~v1.0 Based on vue2.6, Support for all major browsers.~~
|
24 | * [x] ~~v2.0 Based on vue2.6, Support for all major browsers.~~
|
25 | * [x] v3.0 Based on vue2.6, supports modern browsers and retains compatibility with IE11.
|
26 | * [x] v4.0 Based on vue3.x, Only support modern browser, not IE.
|
27 | * [x] v4.7 Based on vue3.x, refactor the components, split the excess components, and keep only the table.
|
28 |
|
29 | ## Browser Support
|
30 |
|
31 | ![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)
|
32 | --- | --- | --- | --- | --- |
|
33 | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
34 |
|
35 | ## Features
|
36 |
|
37 | * [x] Basic table
|
38 | * [x] Configuration grid
|
39 | * [x] Striped
|
40 | * [x] Table with border
|
41 | * [x] Cell style
|
42 | * [x] Column resizing
|
43 | * [x] Minimum/maximum height
|
44 | * [x] Resize height & width
|
45 | * [x] Fixed column
|
46 | * [x] Grouping table header
|
47 | * [x] Table footer
|
48 | * [x] Highlight row & column
|
49 | * [x] Table sequence
|
50 | * [x] Radio
|
51 | * [x] Checkbox
|
52 | * [x] Sorting
|
53 | * [x] Multi field sorting
|
54 | * [x] Filter
|
55 | * [x] Merged cells
|
56 | * [x] Merged footer items
|
57 | * [x] Import/Export/Print
|
58 | * [x] Show/Hide column
|
59 | * [x] Drag and drop/Customize column sorting
|
60 | * [x] Loading
|
61 | * [x] Formatted cell
|
62 | * [x] Slot - template
|
63 | * [x] Context menu
|
64 | * [x] Detail - Expandable row
|
65 | * [x] Toolbar
|
66 | * [x] Virtual tree
|
67 | * [x] Editable CRUD
|
68 | * [x] Validate
|
69 | * [x] Data Proxy
|
70 | * [x] Keyboard navigation
|
71 | * [x] VxeGlobalRenderer
|
72 | * [x] Virtual scroll
|
73 | * [x] Virtual merger
|
74 | * [x] CSS Variable Theme
|
75 | * [x] ([Enterprise](https://vxetable.cn/pluginDocs/)) Cell area selection
|
76 | * [x] ([Enterprise](https://vxetable.cn/pluginDocs/)) Cell copy & paste
|
77 | * [x] ([Enterprise](https://vxetable.cn/pluginDocs/)) Cell find and replace
|
78 | * [x] ([Enterprise](https://vxetable.cn/pluginDocs/)) Full keyboard operation
|
79 |
|
80 | ## Installing
|
81 |
|
82 | Version: [vue](https://www.npmjs.com/package/vue) 3.x
|
83 |
|
84 | ```shell
|
85 | npm install vxe-table
|
86 | ```
|
87 |
|
88 | Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
|
89 |
|
90 | ### npm
|
91 |
|
92 | ```javascript
|
93 | import { createApp } from 'vue'
|
94 | import VXETable from 'vxe-table'
|
95 | import 'vxe-table/lib/style.css'
|
96 |
|
97 | createApp(App).use(VXETable).mount('#app')
|
98 | ```
|
99 |
|
100 | ### CDN
|
101 |
|
102 | Use a third-party CDN to remember to lock the version number to avoid being affected by incompatible updates.
|
103 | ***It is not recommended to use the CDN address of a third party in a formal environment because the connection can fail at any time***
|
104 |
|
105 | ```HTML
|
106 | <!-- Style -->
|
107 | <link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
|
108 | <!-- Script -->
|
109 | <script src="https://unpkg.com/xe-utils"></script>
|
110 | <script src="https://unpkg.com/vxe-table"></script>
|
111 | ```
|
112 |
|
113 | ## Example
|
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-column field="role" title="Role"></vxe-column>
|
122 | <vxe-colgroup title="Group1">
|
123 | <vxe-column field="sex" title="Sex"></vxe-column>
|
124 | <vxe-column field="address" title="Address"></vxe-column>
|
125 | </vxe-colgroup>
|
126 | </vxe-table>
|
127 | </div>
|
128 | </template>
|
129 |
|
130 | <script lang="ts" setup>
|
131 | import { ref } from 'vue'
|
132 |
|
133 | const tableData = ref([
|
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 | </script>
|
139 | ```
|
140 |
|
141 | ## Online Documents
|
142 |
|
143 | 👉 [Document](https://vxetable.cn)
|
144 |
|
145 | ## Run the project
|
146 |
|
147 | Install dependencies
|
148 |
|
149 | ```shell
|
150 | npm install
|
151 | ```
|
152 |
|
153 | Start local debugging
|
154 |
|
155 | ```shell
|
156 | npm run serve
|
157 | ```
|
158 |
|
159 | Compile packaging, generated compiled directory: es,lib
|
160 |
|
161 | ```shell
|
162 | npm run lib
|
163 | ```
|
164 |
|
165 | ## Contributors
|
166 |
|
167 | Thank you to everyone who contributed to this project.
|
168 |
|
169 | [![vxe-table](https://contrib.rocks/image?repo=x-extends/vxe-table)](https://github.com/x-extends/vxe-table/graphs/contributors)
|
170 |
|
171 | ## License
|
172 |
|
173 | [MIT](LICENSE) © 2019-present, Xu Liangzhan
|