1 Star 0 Fork 0

Thyiad/pt-vite

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
global.d.ts 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
Thyiad 提交于 2023-02-18 16:24 +08:00 . feat: upgrade to router v6
import { FC } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import { IState } from './redux/data';
declare global {
// declare module '*.css';
// declare module '*.less';
// declare module '*.scss';
// declare module '*.sass';
// declare module '*.svg';
// declare module '*.png';
// declare module '*.jpg';
// declare module '*.jpeg';
// declare module '*.gif';
// declare module '*.bmp';
// declare module '*.tiff';
interface Window {
ssrData?: IState;
}
interface RouteProps {
/** 页面标题 */
title: string;
/** name, 页面key */
name: string;
/** icon */
icon?: React.ReactNode;
/** 路由 */
path: string;
relativePath?: string;
/** 是否严格匹配 */
exact?: boolean;
/** 如果是跳转,此处配置跳转的路由 */
redirect?: string;
/** 页面组件 */
component?: FC<RoutePageProps>;
/** 子路由 */
routes?: RouteProps[];
/** 是否在菜单中隐藏 */
hideInMenu?: boolean;
/** 权限控制 */
roles?: string[];
/** 是否ssr */
isSSR?: boolean;
/** ssr初始数据 */
getInitialProps?: () => Promise<any>;
}
interface RoutePageProps extends RouteComponentProps {
routes?: RouteProps[];
}
interface ServerListData<T = any> {
total: number;
rows: T[];
}
interface SelectData {
value: string;
label: string;
}
interface CasSelectData extends SelectData {
children: CasSelectData[];
}
interface TreeItem {
key: string;
title: string;
children: TreeItem[];
}
interface TreeSelectItem extends TreeItem {
value: string;
children: TreeSelectItem[];
}
interface BaseModel {
_id: string;
createdAt?: string;
updatedAt?: string;
isDeleted?: boolean;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/Thyiad/pt-vite.git
git@gitee.com:Thyiad/pt-vite.git
Thyiad
pt-vite
pt-vite
master

搜索帮助