/** * Mock 路由类型定义 * 替代 vite-plugin-mock 的 MockMethod 类型 */ export interface MockRequest { query: Record body: any url: string method: string /** URL路径参数,如 /brand/:id 中的 { id: '1' } */ params: Record } export interface MockMethod { url: string method?: 'get' | 'post' | 'put' | 'delete' | 'patch' response?: ((req: MockRequest) => any) | any }