# huarun-cms **Repository Path**: work_79/huarun-cms ## Basic Information - **Project Name**: huarun-cms - **Description**: 华润搅拌站-后台管理系统 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-11 - **Last Updated**: 2025-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 华润搅拌站-后台管理系统 ## [✨ 查看更新日志]() ## 技术栈 - Typescript - [Vite](https://cn.vitejs.dev/guide/#scaffolding-your-first-vite-project) - [Vue3](https://cn.vuejs.org/guide/introduction.html) - [Vue Router](https://router.vuejs.org/zh/introduction.html):路由管理 - [Pinia](https://pinia.vuejs.org/zh/introduction.html):状态管理 - [VueUse](https://vueuse.pages.dev/guide/) - [Element Plus UI](https://element-plus.org/zh-CN/component/overview.html):组件库 - [UnoCSS](https://unocss-cn.pages.dev/guide/) - [Echarts](https://echarts.apache.org/zh/) - [wangEditor](https://www.wangeditor.com/) - [Animate.css](https://animate.style/) - [Vue-ECharts](https://github.com/ecomfe/vue-echarts/blob/main/README.zh-Hans.md) - [高德地图 JS API 2.0](https://lbs.amap.com/api/javascript-api-v2/getting-started) ## 图标库 #### 使用 `unplugin-icons` 插件引入图标库,目前已导入的图标库:elements-plus, ant-design,本地 svg 图标: src/assets/icons > 更多图标库请查看 [iconify](https://icon-sets.iconify.design/) 安装依赖 ## 项目运行 ```bash # 开发环境 npm run dev ``` ## 项目测试 ```bash # eslint检查 npm run lint ``` ## 项目编译打包 ```bash # 测试环境 npm run build:test # 生产环境 npm run build ``` ## 项目打包并发布 ```bash # 测试环境 npm run push:test ``` ## 项目上线 ```bash npm run release ``` ## route路由 ```ts { path: '/user-info', // 短横线方式 name: 'UserInfo', //大驼峰 component: UserInfo, meta: { title: '用户' } }, ``` ## 项目结构 ```plaintext ├── src/ │ ├── assets/ │ ├── components/ │ │ ├── Breadcrumb │ │ │ └── index.vue # 单个文件以 index.vue 命名 │ │ ├── Tab # 多个文件以功能命名 │ │ │ ├── TabList.vue │ │ │ └── TabItem.vue │ ├── views/ │ │ ├── login/ │ │ │ ├── index.vue │ │ │ ├── type.ts # 类型(如果有的话) │ │ │ ├── utils.ts # 工具方法(如果有的话) │ │ │ ├── components # 页面组件(如果有的话) │ │ │ │ ├── Editor.vue # 组件名称必须大写开头 │ │ │ │ └── utils.ts # 组件工具方法(如果有的话) │ │ └── user-info │ │ │ ├── index.vue │ │ │ └── ... │ ├── hooks/ │ │ ├── useRequest/ │ │ │ │ └── index.ts │ ├── enums/ │ │ └── ThemeEnum.ts │ ├── api/ │ │ ├── auth/ │ │ │ └── index.ts │ ├── store/ │ ├── router/ │ └── main.ts ├── index.html ├── .gitignore ├── package.json └── README.md ``` ## 规范 ### 代码规范 - 用空格代替tab - 字符串采用单引号 - 强类型检查: === 代替 ==, !== 代替 != - 优先选择箭头函数 - 不要使用 var - 优先选择解构赋值 ### 命名规范 - 业务文件命名统一小写,多个单词则采用 ' - ' 连接 - 单文件组件命名:使用大驼峰命名法,如 FormList - 与父组件紧密耦合的子组件,命名要以父组件名为前缀,例:TodoList、TodoListItem、TodoListItemButton - props属性:全小写,多个单词则采用 ' - ' 连接,如 `` - ts/js文件命名:全小写,尽量一个单词以内,多个单词则采用 ' - ' 连接,如 day-format - css样式命名:全小写,按功能分层;优先选择单个单词命名,多个单词则采用 ' - ' 连接 - 图片文件名:全小写,优先选择单个单词命名,多个单词命名以下划线分隔,如 qr_code.png - 变量以及函数命名:使用小驼峰命名法,如 orderIndex - 类命名:使用大驼峰命名法 - 常量命名:统一大写 + 下划线方式,如 `const MAX_COUNT = 1` - Storage的Key命名:跟常量名一致 - 事件命名:事件函数命名方式为 on + xxx,如 onLike() => {} ### Git Commit 提交规范,详见 [前端文档](http://192.168.10.111/docs/#/git-commit-style) - feat: 新功能、新特性 - fix: 修改 bug - perf: 更改代码,以提高性能(在不影响代码内部行为的前提下,对程序性能进行优化) - refactor: 代码重构(重构,在不影响代码内部行为、功能下的代码修改) - docs: 文档修改 - style: 代码格式修改, 注意不是 css 修改(例如空格、分号等格式) - test: 测试用例新增、修改 - build: 影响项目构建或依赖项修改(例如scopes: webpack、gulp、npm等) - revert: 代码回退,恢复上一次提交 - ci: 持续集成相关文件修改(例如scopes: Travis,Circle) - chore: 其他修改(不在上述类型中的修改,如改变构建流程、或者增加依赖库、工具等)