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

相关推荐
子兮曰14 小时前
OpenClaw入门:从零开始搭建你的私有化AI助手
前端·架构·github
吴仰晖14 小时前
使用github copliot chat的源码学习之Chromium Compositor
前端
1024小神14 小时前
github发布pages的几种状态记录
前端
不像程序员的程序媛16 小时前
Nginx日志切分
服务器·前端·nginx
北原_春希16 小时前
如何在Vue3项目中引入并使用Echarts图表
前端·javascript·echarts
尽意啊16 小时前
echarts树图动态添加子节点
前端·javascript·echarts
吃面必吃蒜16 小时前
echarts 极坐标柱状图 如何定义柱子颜色
前端·javascript·echarts
O_oStayPositive16 小时前
Vue3使用ECharts
前端·javascript·echarts
竹秋…16 小时前
echarts自定义tooltip中的内容
前端·javascript·echarts
宝贝露.16 小时前
Axure引入Echarts图无法正常显示问题
前端·javascript·echarts