no message

Former-commit-id: ef2dfd6a06e0d6103b58a6343f75a637e086b8a6
Former-commit-id: d6ba17289f54275cc4d5ad60243521e7eabdfdca
Former-commit-id: b403db335b827ba3a7b35ec3e40a8b5795408100
This commit is contained in:
李杨
2018-02-12 18:34:20 +08:00
parent 6f11dd1b9b
commit e625d3c4f2
2 changed files with 6 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
</PageHeader> </PageHeader>
<el-input <el-input
type="textarea" type="textarea"
:autosize="{ minRows: 2, maxRows: 4}" :autosize="{minRows: 2, maxRows: 4}"
placeholder="请输入内容" placeholder="请输入内容"
v-model="text"> v-model="text">
</el-input> </el-input>
@@ -26,7 +26,10 @@ export default {
}, },
methods: { methods: {
exportTxt () { exportTxt () {
console.log('1') this.$export.txt({
text: this.text,
title: '文本'
})
} }
} }
} }

View File

@@ -57,7 +57,7 @@ export default {
const _params = Object.assign({}, paramsDefault, params) const _params = Object.assign({}, paramsDefault, params)
console.log(typeof _params.text) console.log(typeof _params.text)
// 导出 // 导出
const blob = new Blob(['Hello, world!'], {type: 'text/plain;charset=utf-8'}) const blob = new Blob([_params.text], {type: 'text/plain;charset=utf-8'})
FileSaver.saveAs(blob, _params.title + '.txt') FileSaver.saveAs(blob, _params.title + '.txt')
// 完成 // 完成
resolve() resolve()