表格组件.txt 1.39 KB
表格组件,组件参数:
// 展示分页
showPage: {
    type: Boolean,
    default: true
},
showBorder: {
    type: Boolean,
    default: true
},
// 高度
height: {
    type: Number,
    default: window.innerHeight
},
// 展示下标
showIndex: {
    type: Boolean,
    default: true
},
indexLabel: {
    type: String,
    default: '序号'
},
currentPage: {
    type: Number,
    default: 1
},
// 分页页码设置
pageSizes: {
    type: Array,
    default: [50,100, 200, 300, 400]
},
// 默认展示
pageSize: {
    type: Number,
    default: 100
},
// 总数
total: {
    type: Number,
    default: 0
},
// 展示组件
layout: {
    type: String,
    default: "total, sizes, prev, pager, next, jumper"
},
// 列
columns: {
    type: Array,
    default: []
},
// 数据
dataList: {
    type: Array,
    default: []
},
// 加载
loading:{
    type: Boolean,
    default: false
},

--------------------------------------------------------------------
columns参数说明:
// 单元绑定数据key
prop: 'fileName',
// 表头展示名称
label: '文档名称',
sortable:true,
// 对其方式 left center right
align:'left',
click:function (row) {
    // 单元格点击出发的函数 row,当前行的数据
},
render:function (row){
    // 表格个性化展示,返回html
    return html;
}
------------------------slot--------------------------------------------
#default 内容插槽
#tools 工具栏插槽