import { PropsWithChildren, SVGProps } from "react"; export type IconSvgProps = SVGProps & { size?: number; }; export type LocalPropsWithChildren = { params: { local: string; }; } & PropsWithChildren; export interface Pagination { /** * 分页模式--当前页数 */ current_page: number; /** * 升序-降序 */ is_asc: boolean; /** * 是否已经没有数据 */ is_end: boolean; /** * 下一页的起始位,默认0 */ next_cursor: string; /** * 每页大小 */ page_size: number; /** * 如果是升序-那就是最大ID,如果是降序那就是最小ID */ start_cursor: string; /** * 总数 */ total_count: number; /** * 是否使用分页----默认为下标模式 */ use_page: boolean; } export type Result = { code: number; msg: string; data: T; }; export type Response = T extends any[] ? Result & { page: Pagination } : Result;