1.修改pages下document.ejs中
2.修改congfig defaultSettings.ts中title字段
如:错误-找不到模块“./index.less”或其相应的类型声明等
设置src下typings.d.ts文件中类型
//设置导入模块类型
declare module 'slash2';
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';
declare module 'omit.js';
declare module 'numeral';
declare module '@antv/data-set';
declare module 'mockjs';
declare module 'react-fittext';
declare module 'bizcharts-plugin-slider';
// preview.pro.ant.design only do not use in your production ;
// preview.pro.ant.design Dedicated environment variable, please do not use it in your project.
declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined;
declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false;
删除package.json下的gitHooks 或参考ant design pro v5 git commit时报ERROR invalid commit message format的解决方法_Lcwai的博客-CSDN博客ant design pro v5 git commit时报错的解决方法https://blog.csdn.net/Wai_Leung/article/details/123731787
修改config下routes.ts中 路由中path为 / 的参数
{ path: '/', redirect: '/想要跳转的页面' },
修改页面后刷新无效 必须重新npm run才可以刷新页面——尝试修改目录文件名为index.tsx
大写Index会几率导致页面刷新不及时
一般首页为小写index 组件为大写 参考官网目录结构
文件夹结构 - Ant Design Pro 让中后台开发更简单 包含 table form 等多个组件。https://pro.ant.design/zh-CN/docs/folder
示例错误:There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
通常会提示关联文件 —— 把重名文件复制后修改名字即可
防止同一子组件引入相同的子子组件
import type {ActionType, ProColumns} from '@ant-design/pro-components';
import {ProTable} from '@ant-design/pro-components';
import { ProTable, ProColumns } from "@ant-design/pro-table";