mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 11:46:48 +00:00
21 lines
578 B
JavaScript
21 lines
578 B
JavaScript
import ExcelTemplateAdapter from '~/components/import/templateParsers/ExcelTemplateAdapter'
|
|
|
|
export default class ExcelUrlTemplateAdapter extends ExcelTemplateAdapter {
|
|
constructor(url, $store, parserConfig) {
|
|
const name = url.split('/').pop()
|
|
super(name, null, parserConfig)
|
|
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()
|
|
}
|
|
}
|