UNPKG

5.75 kBMarkdownView Raw
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
15A [vue](https://www.npmjs.com/package/vue) based PC form component, support add, delete, change, virtual list, virtual tree, lazy load, shortcut menu, data validation, print export, form rendering, data paging, modal window, custom template, renderer, flexible configuration items, extension interface, etc...
16
17* Design concept
18 * Efficient and concise API design for modern browsers
19 * Modular tables, on-demand loading, extended interfaces
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## Browser Support
23
24![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)
25--- | --- | --- | --- | --- | --- |
2611+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |
27
28## Features
29
30* [x] Basic table
31* [x] Grid
32* [x] Striped
33* [x] Table with border
34* [x] Cell style
35* [x] Column resizing
36* [x] Maximum table height
37* [x] Resize height & width
38* [x] Fixed column
39* [x] Grouping table header
40* [x] Table footer
41* [x] Highlight row & column
42* [x] Table sequence
43* [x] Radio
44* [x] Checkbox
45* [x] Select
46* [x] Switch
47* [x] Sorting
48* [x] Multi field sorting
49* [x] Filter
50* [x] Merged cells
51* [x] Merged footer items
52* [x] Import/Export/Print
53* [x] Show/Hide column
54* [x] Loading
55* [x] Formatted cell
56* [x] Slot - template
57* [x] Context menu
58* [x] Detail - Expandable row
59* [x] Pager
60* [x] Form
61* [x] Toolbar
62* [x] Pulldown
63* [x] Virtual list
64* [x] Virtual tree
65* [x] Editable CRUD
66* [x] Validate
67* [x] Data Proxy
68* [x] Keyboard navigation
69* [x] Modal
70* [x] Renderer
71* [x] Virtual scroller
72* [x] Virtual merger
73* [x] (pro) Cell area selection
74* [x] (pro) Cell copy & paste
75* [x] (pro) Cell find and replace
76
77## Installing
78
79Version:[vue](https://www.npmjs.com/package/vue) 2.6.x, Dependent: [xe-utils](https://www.npmjs.com/package/xe-utils)
80
81```shell
82npm install xe-utils vxe-table@3
83```
84
85Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
86
87### npm
88
89```javascript
90import Vue from 'vue'
91import 'xe-utils'
92import VXETable from 'vxe-table'
93import 'vxe-table/lib/style.css'
94
95Vue.use(VXETable)
96```
97
98### CDN
99
100```HTML
101<!-- Style -->
102<link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
103<!-- Script -->
104<script src="https://unpkg.com/xe-utils"></script>
105<script src="https://unpkg.com/vxe-table"></script>
106<!-- It is recommended that users introduced by CDN lock the version on the link address to avoid the impact of incompatible updates -->
107```
108
109## Example
110
111```html
112<template>
113 <div>
114 <vxe-table :data="tableData">
115 <vxe-column type="seq" title="Seq" width="60"></vxe-column>
116 <vxe-column field="name" title="Name"></vxe-column>
117 <vxe-colgroup title="Group1">
118 <vxe-column field="sex" title="Sex"></vxe-column>
119 <vxe-column field="address" title="Address"></vxe-column>
120 </vxe-colgroup>
121 </vxe-table>
122 </div>
123</template>
124
125<script>
126export default {
127 data () {
128 return {
129 tableData: [
130 { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', address: 'Shenzhen' },
131 { id: 10002, name: 'Test2', role: 'Test', sex: 'Man', address: 'Guangzhou' },
132 { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', address: 'Shanghai' }
133 ]
134 }
135 }
136}
137</script>
138```
139
140## Docs
141
142💡 [User guide](https://github.com/xuliangzhan/vxe-table-demo)
143👉 [View example](https://x-extends.github.io/vxe-table/#/table/base/basic)
144👉 [View API](https://x-extends.github.io/vxe-table/#/table/api)
145
146## Run the project
147
148Install dependencies
149
150```shell
151npm install
152```
153
154Start local debugging
155
156```shell
157npm run serve
158```
159
160Compile packaging, generated compiled directory: lib
161
162```shell
163npm run lib
164```
165
166## License
167
168[MIT](LICENSE) © 2019-present, Xu Liangzhan