no message
Former-commit-id: e0e48f558e24126a96d5088c66f2fa51b05a1812 Former-commit-id: c2b3c1ea34a8442086cd4303e724ef6331950514 Former-commit-id: c45a1c1ab9787521f01a5d411a91adb2f61ffe61
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
// 库
|
||||
import papa from 'papaparse'
|
||||
export default {
|
||||
install (Vue, options) {
|
||||
Vue.prototype.$import = {
|
||||
//
|
||||
csv (file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
papa.parse(file, {
|
||||
header: true,
|
||||
skipEmptyLines: true,
|
||||
complete: (results, file) => {
|
||||
resolve(results)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user