UNPKG

ptool

Version:

vue项目开发通用工具类封装

25 lines (24 loc) 748 B
declare class MockJs { private baseUrl; constructor(baseUrl?: string); /** * 基础方法 * @param path 拦截的路径 * @param params 返回的模拟数据 * @param method 拦截的method */ action(path: string, params: any, method?: string): void; get(path: string, params: any): void; post(path: string, params: any): void; put(path: string, params: any): void; patch(path: string, params: any): void; delete(path: string, params: any): void; head(path: string, params: any): void; options(path: string, params: any): void; tpl(data?: any, msg?: string, status?: number): { msg: string; data: any; status: number; }; } export default MockJs;