no message
Former-commit-id: ef2dfd6a06e0d6103b58a6343f75a637e086b8a6 Former-commit-id: d6ba17289f54275cc4d5ad60243521e7eabdfdca Former-commit-id: b403db335b827ba3a7b35ec3e40a8b5795408100
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</PageHeader>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{minRows: 2, maxRows: 4}"
|
||||
placeholder="请输入内容"
|
||||
v-model="text">
|
||||
</el-input>
|
||||
@@ -26,7 +26,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
exportTxt () {
|
||||
console.log('1')
|
||||
this.$export.txt({
|
||||
text: this.text,
|
||||
title: '文本'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
const _params = Object.assign({}, paramsDefault, params)
|
||||
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')
|
||||
// 完成
|
||||
resolve()
|
||||
|
||||
Reference in New Issue
Block a user