From 28a62b15c0d9a1121d6b80dcceef52ce423dfb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Thu, 15 Feb 2018 15:33:10 +0800 Subject: [PATCH] no message Former-commit-id: c0e2ed71c4ad1d1cbc94582752ebf46eb06754f2 Former-commit-id: 1ea6cdd22b9b742fae869c9ca2804ec753fadf0e Former-commit-id: 9283b33d167a1565b393672b3e3f8587f6e559aa --- src/plugin/export/index.js | 7 ++++--- src/plugin/import/index.js | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugin/export/index.js b/src/plugin/export/index.js index e4aaa96f..4e2034e9 100644 --- a/src/plugin/export/index.js +++ b/src/plugin/export/index.js @@ -6,7 +6,7 @@ import * as Excel from './_export2Excel' export default { install (Vue, options) { Vue.prototype.$export = { - // 导出 CSV + // 导出 csv csv (params) { return new Promise((resolve, reject) => { // 默认值 @@ -26,7 +26,7 @@ export default { resolve() }) }, - // 导出 Excel + // 导出 excel excel (params) { return new Promise((resolve, reject) => { // 默认值 @@ -40,12 +40,13 @@ export default { // 从参数中派生数据 const header = _params.columns.map(e => e.label) const data = _params.data.map(row => _params.columns.map(col => row[col.prop])) - // 导出 Excel + // 导出 Excel.export_json_to_excel(header, data, _params.title) // 完成 resolve() }) }, + // 导出 文本文档 txt (params) { return new Promise((resolve, reject) => { // 默认值 diff --git a/src/plugin/import/index.js b/src/plugin/import/index.js index 64f05f0b..21644b0c 100644 --- a/src/plugin/import/index.js +++ b/src/plugin/import/index.js @@ -3,6 +3,7 @@ import papa from 'papaparse' export default { install (Vue, options) { Vue.prototype.$import = { + // 导入 csv csv (file) { return new Promise((resolve, reject) => { papa.parse(file, {