react 使用笔记

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页面

相关推荐
mCell6 小时前
如何零成本搭建个人站点
前端·程序员·github
mCell7 小时前
为什么 Memo Code 先做 CLI:以及终端输入框到底有多难搞
前端·设计模式·agent
恋猫de小郭8 小时前
AI 在提高你工作效率的同时,也一直在增加你的疲惫和焦虑
前端·人工智能·ai编程
少云清8 小时前
【安全测试】2_客户端脚本安全测试 _XSS和CSRF
前端·xss·csrf
银烛木8 小时前
黑马程序员前端h5+css3
前端·css·css3
m0_607076608 小时前
CSS3 转换,快手前端面试经验,隔壁都馋哭了
前端·面试·css3
听海边涛声8 小时前
CSS3 图片模糊处理
前端·css·css3
IT、木易8 小时前
css3 backdrop-filter 在移动端 Safari 上导致渲染性能急剧下降的优化方案有哪些?
前端·css3·safari
0思必得08 小时前
[Web自动化] Selenium无头模式
前端·爬虫·selenium·自动化·web自动化
anOnion8 小时前
构建无障碍组件之Dialog Pattern
前端·html·交互设计