no message

Former-commit-id: 0093e942af226015f1caf61ed541495dc364bdc9
Former-commit-id: 34a1c926e43a02998e9b4a704a5d98d34d47d11e
Former-commit-id: 3f7e3c31a6e46eeeb84c41fd2e767b99c8f5e9e2
This commit is contained in:
李杨
2018-02-10 21:21:49 +08:00
parent 225331df26
commit 2e045dd0bd
2 changed files with 16 additions and 15 deletions

View File

@@ -24,9 +24,6 @@
<script>
// 假数据
import table from './data'
// 库
import Csv from '@/utils/csv.js'
import ExportCsv from '@/utils/export-csv.js'
export default {
data () {
return {
@@ -42,16 +39,6 @@ export default {
methods: {
exportCsv (params = {}) {
this.$export.csv()
// 默认值
const paramsDefault = {
noHeader: false
}
// 合并参数
const _params = Object.assign({}, params, paramsDefault)
// 生成数据
const data = Csv(this.table.columns, this.table.data, params, _params.noHeader)
// 下载数据
ExportCsv.download('table.csv', data)
}
}
}