# react-vue-生成路由工具 **Repository Path**: wen_qi_li1/react-vue-router ## Basic Information - **Project Name**: react-vue-生成路由工具 - **Description**: No description available - **Primary Language**: Unknown - **License**: MulanPSL-1.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-01-04 - **Last Updated**: 2021-01-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 前端辅助工具 目前仅支持 vue 项目 子路由已经开发完成 ## 辅助方法 - [x] 筛选变量赋值相同的代码 ## 使用方法 ```js npm i react-auth-router -g lwq-cli init // 初始化项目 lwq-cli watch // 监听文件 lwq-cli add // 添加文件目前是创建固定模板 ``` - [ x ] lwq-cli init 初始化项目 - [ x ] lwq-cli add 添加文件 - [ x ] lwq-cli watch 监听文件变化将项目下的所有页面的 json 进行统一到一个 json 文件中。可以通过这个 json 去做扩展。比如路由拦截等等。 - [ x ] react+ts 项目 demo 地址:https://gitee.com/wen_qi_li1/lwq-cli-react-ts-demo.git ## 页面.json 配置 | 字段名 | 类型 | 是否必填 | 作用 | | :-------- | -----: | :------: | :------------------------: | | name | string | 是 | | | path | string | 是 | 路由地址 | | redirect | string | 否 | 重定向的地址 | | component | string | 是 | 文件地址 | | id | number | 是 | 路由 id 注意不可以随意修改 | | parentId | number | 是 | 父级路由 id 谨慎修改 | | query | object | 否 | 动态路由的参数 | ## 作者联系方式 - 786388224@qq.com