表格无法导出分组表头
- Dominant language
- Vue
- Stars
- 16.4k
- Forks
- 4.7k
- PR merge metrics
- No merged PRs in 30d
Description
`this.$refs.tableExcel.exportCsv({
filename: this.excelTitle,
original: false,
columns: this.tableColumns.filter(function(col, index) {
let childs = col.children
if (childs) {
childs.forEach(element => {
element.title = col.title + element.title
})
return childs
} else {
return col
}
})
})`
我用了这个办法,把一级表头的名字和二级表头拼接在一起,请问这样的方式合适么
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the `this.$refs.tableExcel.exportCsv` call and the `tableColumns` data shown in the issue. Check how grouped columns are handled during CSV export, then verify that exported headers preserve the intended first- and second-level names without mutating the table column definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100