多维表格
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
512 B

import JSONTemplateAdapter from './JSONTemplateAdapter'
const { $api } = useNuxtApp()
export default class JSONUrlTemplateAdapter extends JSONTemplateAdapter {
url: string
constructor(url: string, parserConfig: Record<string, any>) {
const name = url.split('/').pop()
super(name, parserConfig)
this.url = url
}
async init() {
const data = await $api.utils.axiosRequestMake({
apiMeta: {
url: this.url,
},
})
this._jsonData = data
await super.init()
}
}