no message
Former-commit-id: 5e52707582898ab2db8712e347e856d98145e30a Former-commit-id: 7d083dfdde9502e7f6e71da8856b6804f5b0605e Former-commit-id: 764ad6323c6c633f1288f143c240edfc2c8d897b
This commit is contained in:
@@ -41,12 +41,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
exportCsv (params = {}) {
|
||||
// 默认值
|
||||
const paramsDefault = {
|
||||
noHeader: false
|
||||
}
|
||||
// 合并参数
|
||||
const _params = Object.assign({}, params, paramsDefault)
|
||||
const noHeader = _params.noHeader
|
||||
const data = Csv(this.table.columns, this.table.data, params, noHeader)
|
||||
// 生成数据
|
||||
const data = Csv(this.table.columns, this.table.data, params, _params.noHeader)
|
||||
// 下载数据
|
||||
ExportCsv.download('table.csv', data)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user