@marv1n/vxe-table

(为项目特殊需求改写,仅内部使用) 一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟滚动、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、虚拟列表、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...

Usage no npm install needed!

<script type="module">
  import marv1nVxeTable from 'https://cdn.skypack.dev/@marv1n/vxe-table';
</script>

README

vxe-table

简体中文 | 繁體中文 | English

star npm version npm build npm downloads issues issues closed pull requests pull requests closed npm license

A vue based PC form component, support add, delete, change, virtual scroll, lazy load, shortcut menu, data validation, tree structure, print export, form rendering, data paging, virtual list, modal window, custom template, renderer, flexible configuration items, extension interface, etc...

  • Design concept
    • Efficient and concise API design for modern browsers
    • Modular tables, on-demand loading, extended interfaces
    • 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

Browser Support

IE Edge Chrome Firefox Opera Safari
11+ ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔ 8+ ✔

Features

  • Basic table
  • Grid
  • Striped
  • Table with border
  • Cell style
  • Column resizing
  • Maximum table height
  • Resize height & width
  • Fixed column
  • Grouping table header
  • Table footer
  • Highlight row & column
  • Table sequence
  • Radio
  • Checkbox
  • Select
  • Switch
  • Sorting
  • Multi field sorting
  • Filter
  • Merged cells
  • Merged footer items
  • Import/Export/Print
  • Show/Hide column
  • Loading
  • Formatted cell
  • Slot - template
  • Context menu
  • Detail - Expandable row
  • Pager
  • Form
  • Toolbar
  • Pulldown
  • List
  • Editable CRUD
  • Tree table
  • Validate
  • Data Proxy
  • Keyboard navigation
  • Modal
  • Renderer
  • Virtual scroller
  • Virtual merger
  • (pro) Cell area selection
  • (pro) Cell copy & paste
  • (pro) Cell find and replace

Installing

Version:vue 2.6.x, Dependent: xe-utils

npm install xe-utils vxe-table

Get on unpkg and cdnjs

npm

import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

Vue.use(VXETable)

CDN

<!-- Style -->
<link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
<!-- Script -->
<script src="https://unpkg.com/xe-utils"></script>
<script src="https://unpkg.com/vxe-table"></script>
<!-- It is recommended that users introduced by CDN lock the version on the link address to avoid the impact of incompatible updates -->

Example

<template>
  <div>
    <vxe-table :data="tableData">
      <vxe-column type="seq" title="Seq" width="60"></vxe-column>
      <vxe-column field="name" title="Name"></vxe-column>
      <vxe-colgroup title="Group1">
        <vxe-column field="sex" title="Sex"></vxe-column>
        <vxe-column field="address" title="Address"></vxe-column>
      </vxe-colgroup>
    </vxe-table>
  </div>
</template>

<script>
export default {
  data () {
    return {
      tableData: [
        { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', address: 'Shenzhen' },
        { id: 10002, name: 'Test2', role: 'Test', sex: 'Man', address: 'Guangzhou' },
        { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', address: 'Shanghai' }
      ]
    }
  }
}
</script>

Docs

💡 User guide
👉 View example
👉 View API

Run the project

Install dependencies

npm install

Start local debugging

npm run serve

Compile packaging, generated compiled directory: lib

npm run lib

License

MIT © 2019-present, Xu Liangzhan