1.学习:https://reactjs.bootcss.com/learn
2.项目启动报错:Delete ␍
prettier/prettier
解决:https://blog.csdn.net/qq_30272167/article/details/133280165
3.访问地址配置
文件:config-overrides.js
javascript
devServer: function (configFunction) {
return function (proxy, allowedHost) {
const config = configFunction(proxy, allowedHost);
config.proxy = {
"/api": {
// target: "http://10.30.1.12",//服务器
target: "http://localhost:9999",//测试
ws: true,
changeOrigin: true,
pathRewrite: {
"^/api": "",
},
},
};
return config;
};
},
4.菜单路由配置
router=》module=》pages.js
javascript
// 单位配置
{
path: "/vip/configure",
component: React.lazy(() => import("@/pages/vip/configure")),
permis: false,
},
其中:pages/vip/configure 指的是页面路径,默认访问index.jsx页面