no message

Former-commit-id: e0e48f558e24126a96d5088c66f2fa51b05a1812
Former-commit-id: c2b3c1ea34a8442086cd4303e724ef6331950514
Former-commit-id: c45a1c1ab9787521f01a5d411a91adb2f61ffe61
This commit is contained in:
李杨
2018-02-15 15:32:10 +08:00
parent 3170e42acd
commit c9689adcde
2 changed files with 17 additions and 10 deletions

View File

@@ -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)
}
})
})
}
}
}
}