0.3.6 • Published 4 years ago

vue-fast-table v0.3.6

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Vue-Fast-Table

Installation

NPM
npm install vue-fast-table --save

Usage

Global

// require lib
import Vue from 'vue'
import VueFastTable from 'vue-fast-table'

Vue.use(VueFastTable /*, { size: { theme: 'default'  }} */)

// in page
<vue-table :data="data" :columns="columns"></vue-table>

Component

// in template
<vue-table :data="data" :columns="columns"></vue-table>

// require component
import { VueFastTable } from 'vue-fast-table'

// component
export default {
  components: {
    VueFastTable
  }
}

Props

Table

参数说明类型可选值默认值
border是否有边框Booleantrue/falsefalse
loading是否显示loading遮罩层Booleantrue / falsefalse
columns表格列的配置描述,具体项见下表Array--
data表格显示的数据Array--
height表格的高度,默认为自动高度。可以为Number类型,400;也可为String类型,'400' / '400px';亦可为'+400',此时代表 height 为 calc(100vh - 400px)Number/String400/'400'/'400px'/'+400'-
index是否展示表格行号Booleantrue / falsefalse
size表格大小尺寸Stringdefault / small / minidefault
emptyText表格无数据时显示的文本内容String-No Data
rowClass表格行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。Function({row, rowIndex})--

Column

参数说明类型可选值默认值
key对应表格数据的字段String--
label对应表头显示文本---
align设置列的对齐方式Stringleft / center / rightleft
slot指定插槽对应的keyString--
tooltip当内容过长时隐藏Booleantrue / falsefalse
width列的固定宽度String / Number--
type设定某些特殊列Stringselect / ..-
hide是否隐藏掉该列Booleantrue / falsefalse

Table Events

事件名说明参数
select-change当选择项发生变化时会触发该事件selection
select-all当用户手动勾选全选时触发的事件selection

Table Methods

事件名说明参数
clearSelection用于多选表格,清空用户的选择-

License

Copyright (c) 2020 Peek-A-Booo by MIT

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago