@fmdevui/fm-dev
Version:
Page level components developed based on Element Plus.
30 lines (29 loc) • 2.26 kB
TypeScript
import { CustomAxiosRequestConfig } from '../utils/request';
import { AxiosResponse } from 'axios';
export declare const useBaseApi: (module: string, options?: CustomAxiosRequestConfig) => {
baseUrl: string;
request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
pcomm: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
gcomm: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
download: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
page: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
detail: (id: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
dropdownData: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
add: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
update: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
setStatus: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
delete: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
batchDelete: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
exportData: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
downloadTemplate: (cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
importData: (file: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
uploadFile: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
};
export declare const useApi: (url: string, options?: CustomAxiosRequestConfig) => {
baseUrl: string;
request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
};