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

相关推荐
三十_A18 小时前
【无标题】
前端·后端·node.js
excel18 小时前
Vue 编译器源码解读:transformVBindShorthand 的设计与原理
前端
时间的情敌19 小时前
Vue3的异步DOM更新:nextTick的正确使用方法
前端·javascript·vue.js
风语者日志19 小时前
[LitCTF 2023]作业管理系统
前端·网络·安全·web安全·ctf
excel19 小时前
深入解析:Vue 编译器核心工具函数源码(compiler-core/utils.ts)
前端
excel19 小时前
第五章:辅助函数与全流程整合
前端
excel19 小时前
🔍 深度解析:Vue 编译器中的 validateBrowserExpression 表达式校验机制
前端
excel19 小时前
深度解析:Vue 模板编译器中的 Tokenizer 实现原理
前端
excel19 小时前
🧩 Vue 编译核心:transform.ts 源码深度剖析
前端
excel19 小时前
Vue Runtime Helper 常量与注册机制源码解析
前端