fix table 导出 序号

This commit is contained in:
Theluyuan 2023-10-24 13:28:08 +08:00
parent 01a43630c6
commit f62909247c
4 changed files with 66 additions and 65 deletions

View File

@ -1187,15 +1187,15 @@ const _sfc_main = defineComponent({
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
}
}
if (tableColumn.type == "number") {
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
const rowspan = rowColSpan ? rowColSpan[0] : 1;
const colspan = rowColSpan ? rowColSpan[1] : 1;
if (rowspan != 0 && colspan != 0) {
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${columnIndex}</td>`;
}
}
});
if (tableColumn.type == "number") {
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
const rowspan = rowColSpan ? rowColSpan[0] : 1;
const colspan = rowColSpan ? rowColSpan[1] : 1;
if (rowspan != 0 && colspan != 0) {
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${rowIndex}</td>`;
}
}
});
tableStr += "</tr>";
});

View File

@ -19634,15 +19634,15 @@ const _sfc_main$D = defineComponent({
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
}
}
if (tableColumn.type == "number") {
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
const rowspan = rowColSpan ? rowColSpan[0] : 1;
const colspan = rowColSpan ? rowColSpan[1] : 1;
if (rowspan != 0 && colspan != 0) {
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${columnIndex}</td>`;
}
}
});
if (tableColumn.type == "number") {
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
const rowspan = rowColSpan ? rowColSpan[0] : 1;
const colspan = rowColSpan ? rowColSpan[1] : 1;
if (rowspan != 0 && colspan != 0) {
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${rowIndex}</td>`;
}
}
});
tableStr += "</tr>";
});

View File

@ -417,7 +417,9 @@ const exportData = () => {
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
}
}
if(tableColumn.type == "number"){
});
if(tableColumn.type == "number"){
const rowColSpan = props.spanMethod(
item,
tableColumn,
@ -427,10 +429,9 @@ const exportData = () => {
const rowspan = rowColSpan ? rowColSpan[0] : 1;
const colspan = rowColSpan ? rowColSpan[1] : 1;
if (rowspan != 0 && colspan != 0) {
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${columnIndex}</td>`;
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${rowIndex}</td>`;
}
}
});
});
tableStr += "</tr>";
});

File diff suppressed because one or more lines are too long