|
@@ -8,6 +8,7 @@
|
|
|
:search.sync="search"
|
|
|
:table-loading="loading"
|
|
|
:span-method="spanMethod"
|
|
|
+ :cell-style="cellStyle"
|
|
|
@search-change="searchChange"
|
|
|
@search-reset="searchReset"
|
|
|
@selection-change="selectionChange"
|
|
@@ -95,9 +96,9 @@
|
|
|
},
|
|
|
rowspan() {
|
|
|
//记录原始
|
|
|
- let oldList = [this.dataList[0].name]
|
|
|
+ let oldList = [this.dataList[0].userName]
|
|
|
this.dataList.forEach((item,index)=>{
|
|
|
- let newList = [item.name]
|
|
|
+ let newList = [item.userName]
|
|
|
if(index===0){
|
|
|
this.spanArr.push(1)
|
|
|
this.position=0;
|
|
@@ -116,7 +117,7 @@
|
|
|
})
|
|
|
},
|
|
|
spanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
- if (column.property === "name") {
|
|
|
+ if (column.property === "userName") {
|
|
|
const _row=this.spanArr[rowIndex];
|
|
|
const _col=_row>0?1:0;
|
|
|
return {
|
|
@@ -170,6 +171,9 @@
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
+ cellStyle() {
|
|
|
+ return "padding:0;height:40px;";
|
|
|
+ },
|
|
|
//列保存触发
|
|
|
async saveColumn() {
|
|
|
const inSave = await this.saveColumnData(
|