no message
Former-commit-id: ef2dfd6a06e0d6103b58a6343f75a637e086b8a6 Former-commit-id: d6ba17289f54275cc4d5ad60243521e7eabdfdca Former-commit-id: b403db335b827ba3a7b35ec3e40a8b5795408100
This commit is contained in:
@@ -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