no message
Former-commit-id: e90e0bcd2753758022b82eb377b3bebe3dfe1aaa Former-commit-id: 7a80c223ef003a5fe6de230609c2e3526d36292c Former-commit-id: 896d21ce1bbc6e41d9abd70b32d9608161f1d48c
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// 库
|
||||
import Csv from './_csv'
|
||||
import ExportCsv from './_export-csv'
|
||||
import * as excel from './_export2Excel'
|
||||
export default {
|
||||
install (Vue, options) {
|
||||
// 导出
|
||||
Vue.prototype.$export = {
|
||||
// 导出 CSV
|
||||
csv (params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 默认值
|
||||
@@ -23,6 +24,12 @@ export default {
|
||||
// 完成
|
||||
resolve(data)
|
||||
})
|
||||
},
|
||||
// 导出 Excel
|
||||
excel () {
|
||||
const tHeader = ['Id', 'Title', 'Author', 'Readings', 'Date']
|
||||
const data = []
|
||||
excel.export_json_to_excel(tHeader, data, 'demo')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user