feat: export-excel 支持 label 使用 tpl Closes #5811

This commit is contained in:
wuduoyi 2023-05-08 16:27:03 +08:00
parent ff7084ed9d
commit ee7bce25e1
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ export default {
columns: [
{
name: 'icon',
label: '图标',
label: '<%= "图标" %>',
type: 'image'
},
{

View File

@ -128,7 +128,7 @@ export async function exportExcel(
: columns;
const firstRowLabels = filteredColumns.map(column => {
return column.label;
return filter(column.label, data);
});
const firstRow = worksheet.getRow(1);
firstRow.values = firstRowLabels;