1.0.19 • Published 12 months ago
rw-ui-pc v1.0.19
rw-ui-pc
rw-ui-table
tableHead: {
url: getLoudongDetial, //列表接口
params: { //列表接口参数
keyword: '',
type: ''
},
//分页方式pagination loadMore 上拉加载
pagingType: 'pagination',
//表格每行的样式
cellStyle ({
row,
column,
rowIndex,
columnIndex
}) {
return {
color: '#FFF',
background: rowIndex % 2 === 0 ? '#07262E' : '#063743'
}
},
//表格头部样式
headerCellStyle () {
return {
background: '#FBE7E7',
'text-align': 'center',
color: '#333'
}
},
//表格批量复选框
selection: {
isSelection: true,
handleSelectionChange: (selection) => {
console.log(selection, 'handleSelectionChange==============')
}
},
//表格index
indexObj: {
isIndex: true,
indexName: '排名'
},
//表格数据
prop: 绑定字段名
label: 表头名字
align:文字居中方式
minWidth:最小宽
width:宽
fixed:固定
dataType: slot、phone、option、progress、tag
data: [
{
prop: 'area_name',
label: '区块名称',
align: 'center',
minWidth: '55px',
dataType: ''
}, {
prop: 'xqname',
minWidth: '100px',
label: '小区名称',
align: 'center',
dataType: ''
}, {
prop: 'loudong',
label: '楼栋名称',
minWidth: '100px',
align: 'center',
dataType: ''
}, {
prop: 'dy_count',
label: '单元数',
minWidth: '100px',
align: 'center',
dataType: ''
}, {
prop: 'dy_count',
label: '电话',
minWidth: '100px',
align: 'center',
dataType: 'phone'
},{
prop: 'lc_total',
label: '总楼层',
minWidth: '100px',
align: 'center',
dataType: 'slot',
slot: 'totalSlot'
}, {
prop: 'audit_status',
label: '状态',
align: 'center',
dataType: '',
formatData: (item) => {
const str = item === 0 ? '未审核' : item === 1 ? '审核通过' : '驳回'
return str
}
},
{
fixed: 'right',
dataType: 'option',
align: 'center',
label: '操作',
width: '200px',
operation: [
{
name: '编辑',
type: '',
size: 'mini',
icon: 'el-icon-edit',
plain: true,
clickFun: (row) => {
console.log(row, 'rowData==============')
}
},
{
name: '删除',
type: 'danger',
size: 'mini',
icon: 'el-icon-delete',
plain: true,
clickFun: (row) => {
}
}
]
}]
}