no message
Former-commit-id: e2f6752fb1753fe4f37c2c8946b9a6aa0957fa4b Former-commit-id: b15947056bb4badc1f83738c5563b49d99f8887e Former-commit-id: e44de0a15350e6ff547bce5457c055476e8a0946
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// 库
|
// 库
|
||||||
import Csv from './_csv'
|
import Csv from './_csv'
|
||||||
import ExportCsv from './_export-csv'
|
import ExportCsv from './_export-csv'
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
import * as Excel from './_export2Excel'
|
import * as Excel from './_export2Excel'
|
||||||
export default {
|
export default {
|
||||||
install (Vue, options) {
|
install (Vue, options) {
|
||||||
@@ -44,6 +45,14 @@ export default {
|
|||||||
// 完成
|
// 完成
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
txt (params) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const blob = new Blob(['Hello, world!'], {type: 'text/plain;charset=utf-8'})
|
||||||
|
FileSaver.saveAs(blob, 'hello world.txt')
|
||||||
|
// 完成
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user