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 | | 文本 |