no message
Former-commit-id: e0e48f558e24126a96d5088c66f2fa51b05a1812 Former-commit-id: c2b3c1ea34a8442086cd4303e724ef6331950514 Former-commit-id: c45a1c1ab9787521f01a5d411a91adb2f61ffe61
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import papa from 'papaparse'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -47,17 +46,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleUpload (file) {
|
||||
papa.parse(file, {
|
||||
header: true,
|
||||
skipEmptyLines: true,
|
||||
complete: (results, file) => {
|
||||
this.table.columns = Object.keys(results.data[0]).map(e => ({
|
||||
this.$import.csv(file)
|
||||
.then(res => {
|
||||
this.table.columns = Object.keys(res.data[0]).map(e => ({
|
||||
label: e,
|
||||
prop: e
|
||||
}))
|
||||
this.table.data = results.data
|
||||
}
|
||||
})
|
||||
this.table.data = res.data
|
||||
})
|
||||
return false
|
||||
},
|
||||
download () {
|
||||
|
||||
Reference in New Issue
Block a user