| 参数名称 | 使用说明 | 类型 | 参数说明 |
| tableHeight | 表格高度;选填 | Number | / |
| columns | 列名;必填 | Array数组 | columns: [ { value: 'col1', // 列的值 label: '第一列', // 列的名称 editable: true, // 列是否可编辑 type: 'input', // 列的编辑类型,input || checkbox 目前只支持文本框和复选框 className: 'header', // 列的css样式,选填 align: 'center' // 列的对齐方式,选填,默认left fixed: true, // 列是否固定在左侧或者右侧,true 表示固定在左侧,string || boolean,可选:true, left, right width:'200', // 对应列的宽度,String,选填 sortable:false, // 对应列是否可以排序,'custom'代表用户希望远程排序,需要监听 Table 的 sort-change 事件 formatter: 'this.dataFormat(row, column, cellValue)' // 用来格式化内容 Function(row, column, cellValue) align: 'center', // 对应列对齐方式,left || center || right class-name: 'className' // 对应列样式,css名称,选填 }, { value: 'col2', label: '第二列', } ... ] |
| tableData | 表格数据;必填 | Array数组 | tableData: [ { col1: '11', // 单元格的值,元素名称需要和columns数组中的value值一一对应 col2: '12' }, { col1: '21', col2: '22' } ... ] |
| tableType | 表格类型 | Sting | 1 || 2 || 3 || 4 ;1.纯数据表格;2.带复选框表格;3.带编辑按钮表格;4.带复选框、编辑按钮表格 |
| totalCount | 总记录数;必填 | Number | 4 |
| pageSizes | 分页选择项;必填 | Array数组 | [ 5, 10, 20] |
| pageSize | 分页值; | Number | 5,即5条数据一页 |
| currentPage | 设置初始页 | Number | 1,即起始页为1 |
| btns | 按钮值;tableType包含编辑按钮的情况下必填 | Array数组 |
btns: { btnArr: [ { label: '修改', // 按钮的名称 value: 'modify', // 按钮的值 functionName: this.modify // 按钮的方法 }, { label: '取消', value: 'cancel', functionName: this.cancel } ... ], value: 'operation', // 列的值 label: '操作' // 列的名称 } |
| queryData | 表格数据查询方法 | Function | / |