# my-umi-app-01 **Repository Path**: lzh2019/my-umi-app-01 ## Basic Information - **Project Name**: my-umi-app-01 - **Description**: umi+react 开发前端中台 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-10 - **Last Updated**: 2025-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # My Umi App 01 This is a project built with [UmiJS](https://umijs.org/), a scalable enterprise-level front-end framework. ## Features - 🚀 Fast and modern development experience - 📦 Built-in routing and plugin system - 🎨 Easy to customize and extend ## Getting Started ### Prerequisites - Node.js >= 14 - npm or yarn ### Installation ```bash # Install dependencies npm install # or yarn ``` ### Development ```bash # Start the development server npm start # or yarn start ``` Visit [http://localhost:8000](http://localhost:8000) to view your app in the browser. ### Build ```bash # Build for production npm run build # or yarn build ``` The production-ready files will be in the `dist` directory. ## Folder Structure ``` my-umi-app-01/ ├── src/ # Source code ├── public/ # Static assets ├── .umirc.ts # UmiJS configuration ├── package.json # Project metadata └── README.md # Project documentation ``` ## License This project is licensed under the MIT License. ## 开发记录 ### Umi 的路由是基于 react-router@6.3 实现 通过命令即可创建路由 ``` npx umi g page products ``` 执行这个命令,会在pages下生成tsx和less文件 Write: src/pages/products.tsx Write: src/pages/products.less ### umi新增路由声明 修改配置文件 .umirc.ts 加上新增的路由声明 修改routes里边的内容即可 新增路由声明案例 ``` { path: "/products", component: "products" }, ```