no message

Former-commit-id: 5e52707582898ab2db8712e347e856d98145e30a
Former-commit-id: 7d083dfdde9502e7f6e71da8856b6804f5b0605e
Former-commit-id: 764ad6323c6c633f1288f143c240edfc2c8d897b
This commit is contained in:
李杨
2018-02-10 21:12:07 +08:00
parent 9c9452a1b8
commit ea9de0c547

View File

@@ -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)
}
}