avue-crud合并最后一行的前三列
二、使用步骤
1.引入库
代码如下(示例):
spanMethod({ row, column, rowIndex, columnIndex }) {
console.log(this.patrolRcdData.length - 1, rowIndex, columnIndex, row, column, 'mmmmmmm')
if (rowIndex == this.patrolRcdData.length - 1) {
if (columnIndex == 0) {
return [this.patrolRcdData.length - 1, 3]
}
if (columnIndex < 3) {
// 重点在else
return {
rowspan: 0, // 清除就是这俩属性设置为0
colspan: 0, // 清除就是这俩属性设置为0
}
}
}
// this.$nextTick(() => {
// this.patrolRcdData[this.patrolRcdData.length - 1].score = row.score
// })
console.log(this.patrolRcdData[this.patrolRcdData.length - 1].score, this.patrolRcdData.length - 1, 'iiii')
},