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.
21 lines
550 B
21 lines
550 B
3 years ago
|
import ExcelTemplateAdapter from '~/components/import/templateParsers/ExcelTemplateAdapter'
|
||
|
|
||
|
export default class ExcelUrlTemplateAdapter extends ExcelTemplateAdapter {
|
||
|
constructor(url, $store) {
|
||
|
const name = url.split('/').pop()
|
||
|
super(name, null)
|
||
|
this.url = url
|
||
|
this.$store = $store
|
||
|
}
|
||
|
|
||
|
async init() {
|
||
|
const res = await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'handleAxiosCall',
|
||
|
[{
|
||
|
url: this.url,
|
||
|
responseType: 'arraybuffer'
|
||
|
}]])
|
||
|
this.excelData = res.data
|
||
|
await super.init()
|
||
|
}
|
||
|
}
|