From 6a969d133a54b9360a1afe16c5a16411f0673042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Mon, 12 Feb 2018 22:10:37 +0800 Subject: [PATCH] no message Former-commit-id: 3a952e5e9807d5563b87cf25a2f33dfd08cf4c09 Former-commit-id: 506c799e082633de94bc431551b6560187edc981 Former-commit-id: 116512b937a9387be5ffb0b4e8cad09468ecbe4d --- src/plugin/export/index.js | 2 +- static/markdownFiles/article/插件 - 导出.md | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/plugin/export/index.js b/src/plugin/export/index.js index ec129c66..e4aaa96f 100644 --- a/src/plugin/export/index.js +++ b/src/plugin/export/index.js @@ -51,7 +51,7 @@ export default { // 默认值 const paramsDefault = { text: '', - title: 'text' + title: '文本' } // 合并参数 const _params = Object.assign({}, paramsDefault, params) diff --git a/static/markdownFiles/article/插件 - 导出.md b/static/markdownFiles/article/插件 - 导出.md index 5bd16fc1..148d698e 100644 --- a/static/markdownFiles/article/插件 - 导出.md +++ b/static/markdownFiles/article/插件 - 导出.md @@ -124,14 +124,14 @@ this.$export.excel({ ## Vue.$export.txt() -此方法将数据以 `xlsx` 格式导出,并且返回一个 `Promise` 对象 +此方法将数据以 `txt` 格式导出,并且返回一个 `Promise` 对象 使用 ``` -this.$export.excel({ - columns, - data +this.$export.txt({ + text: '文本内容', + title: '文件名' }) .then(() => { // ...可选回调 @@ -142,11 +142,5 @@ this.$export.excel({ | 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | --- | -| columns | 列 | 非 | Array | | 空数组 | -| data | 行数据 | 非 | Array | | 空数组 | -| table | 文件名 | 非 | String | | table | - -示例 - -``` -``` +| text | 文件内容 | 非 | String | | 空 | +| title | 文件名 | 非 | String | | 文本 |