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.
 

22 lines
511 B

import { createCURD } from '@/service/base.ts'
import { RFormTypes } from '@/types/r-form/model'
import request from '@/request.ts'
const model = (api: string) => {
return {
...createCURD<any, RFormTypes.IModel>(api),
proxy: async <T = RFormTypes.IModelCURD>(params?: {
path: string,
body: any,
method?: string
}) => {
return request.post<T>(`/x_form/proxy`, {
api: `${api}/ui/curd`,
method: 'post',
...params
})
}
}
}
export { model }