接口文件是自动生成的,生成的method为DELETE的data需要修改为[data]
如何能批量的替换掉,一个文件里会有多个export async function
export async function deleteE (
data: {
app: any;
},
options?: Record<string, any>,
): Promise<CommonResult<any>> {
return axios({
method: 'DELETE',
url: `/api/app/`,
data: {
...data,
},
...(options || {}),
})
}
替换成
export async function deleteE (
data: {
app: any;
},
options?: Record<string, any>,
): Promise<CommonResult<any>> {
return axios({
method: 'DELETE',
url: `/api/app/`,
data: [data],
...(options || {}),
})
}