mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
611 B
23 lines
611 B
3 years ago
|
import ExcelTemplateAdapter from '~/components/import/templateParsers/ExcelTemplateAdapter'
|
||
|
|
||
|
export default class ExcelUrlTemplateAdapter extends ExcelTemplateAdapter {
|
||
2 years ago
|
constructor(url, $store, parserConfig, $api, quickImportType) {
|
||
3 years ago
|
const name = url.split('/').pop()
|
||
3 years ago
|
super(name, null, parserConfig)
|
||
3 years ago
|
this.url = url
|
||
3 years ago
|
this.$api = $api
|
||
3 years ago
|
this.$store = $store
|
||
2 years ago
|
this.quickImportType = quickImportType
|
||
3 years ago
|
}
|
||
|
|
||
|
async init() {
|
||
3 years ago
|
const data = await this.$api.utils.axiosRequestMake({
|
||
|
apiMeta: {
|
||
2 years ago
|
url: this.url
|
||
3 years ago
|
}
|
||
|
})
|
||
|
this.excelData = data.data
|
||
3 years ago
|
await super.init()
|
||
3 years ago
|
}
|
||
|
}
|