mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-16 23:53:37 +08:00
perf: 通用CRUD
This commit is contained in:
@@ -161,6 +161,23 @@ class PureHttp {
|
||||
): Promise<P> {
|
||||
return this.request<P>("get", url, params, config);
|
||||
}
|
||||
/** 单独抽离的put工具函数 */
|
||||
public put<T, P>(
|
||||
url: string,
|
||||
params?: AxiosRequestConfig<T>,
|
||||
config?: PureHttpRequestConfig
|
||||
): Promise<P> {
|
||||
return this.request<P>("put", url, params, config);
|
||||
}
|
||||
|
||||
/** 单独抽离的delete工具函数 */
|
||||
public delete<T, P>(
|
||||
url: string,
|
||||
params?: AxiosRequestConfig<T>,
|
||||
config?: PureHttpRequestConfig
|
||||
): Promise<P> {
|
||||
return this.request<P>("delete", url, params, config);
|
||||
}
|
||||
}
|
||||
|
||||
export const http = new PureHttp();
|
||||
|
||||
Reference in New Issue
Block a user