fix table 导出 序号
This commit is contained in:
parent
01a43630c6
commit
f62909247c
@ -1187,16 +1187,16 @@ const _sfc_main = defineComponent({
|
|||||||
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
|
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
if (tableColumn.type == "number") {
|
if (tableColumn.type == "number") {
|
||||||
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
|
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
|
||||||
const rowspan = rowColSpan ? rowColSpan[0] : 1;
|
const rowspan = rowColSpan ? rowColSpan[0] : 1;
|
||||||
const colspan = rowColSpan ? rowColSpan[1] : 1;
|
const colspan = rowColSpan ? rowColSpan[1] : 1;
|
||||||
if (rowspan != 0 && colspan != 0) {
|
if (rowspan != 0 && colspan != 0) {
|
||||||
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${columnIndex}</td>`;
|
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${rowIndex}</td>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
tableStr += "</tr>";
|
tableStr += "</tr>";
|
||||||
});
|
});
|
||||||
var worksheet = "Sheet1";
|
var worksheet = "Sheet1";
|
||||||
|
@ -19634,16 +19634,16 @@ const _sfc_main$D = defineComponent({
|
|||||||
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
|
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
if (tableColumn.type == "number") {
|
if (tableColumn.type == "number") {
|
||||||
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
|
const rowColSpan = props.spanMethod(item, tableColumn, rowIndex, columnIndex);
|
||||||
const rowspan = rowColSpan ? rowColSpan[0] : 1;
|
const rowspan = rowColSpan ? rowColSpan[0] : 1;
|
||||||
const colspan = rowColSpan ? rowColSpan[1] : 1;
|
const colspan = rowColSpan ? rowColSpan[1] : 1;
|
||||||
if (rowspan != 0 && colspan != 0) {
|
if (rowspan != 0 && colspan != 0) {
|
||||||
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${columnIndex}</td>`;
|
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${rowIndex}</td>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
tableStr += "</tr>";
|
tableStr += "</tr>";
|
||||||
});
|
});
|
||||||
var worksheet = "Sheet1";
|
var worksheet = "Sheet1";
|
||||||
|
@ -417,6 +417,8 @@ const exportData = () => {
|
|||||||
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
|
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${item[name]}</td>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
if(tableColumn.type == "number"){
|
if(tableColumn.type == "number"){
|
||||||
const rowColSpan = props.spanMethod(
|
const rowColSpan = props.spanMethod(
|
||||||
item,
|
item,
|
||||||
@ -427,11 +429,10 @@ const exportData = () => {
|
|||||||
const rowspan = rowColSpan ? rowColSpan[0] : 1;
|
const rowspan = rowColSpan ? rowColSpan[0] : 1;
|
||||||
const colspan = rowColSpan ? rowColSpan[1] : 1;
|
const colspan = rowColSpan ? rowColSpan[1] : 1;
|
||||||
if (rowspan != 0 && colspan != 0) {
|
if (rowspan != 0 && colspan != 0) {
|
||||||
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${columnIndex}</td>`;
|
tableStr += `<td colspan=${colspan} rowspan=${rowspan}>${rowIndex}</td>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
tableStr += "</tr>";
|
tableStr += "</tr>";
|
||||||
});
|
});
|
||||||
var worksheet = "Sheet1";
|
var worksheet = "Sheet1";
|
||||||
|
92
umd/index.js
92
umd/index.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user