Files
cutejava/cutejava-front/README.md
T
odboy 28ab082dac style(theme): 优化SVG图标并新增暗色主题配置
- 优化了download、menu、minus-sign、plus、reply等SVG图标文件,移除了冗余的XML声明和命名空间
- 新增了6套暗色AI主题配置,包括琥珀流光、翡翠流光、翡翠森林、深海幽蓝、玫瑰绯红、紫罗兰梦
- 更新了README.md文档,改进了标题层级结构和命令说明章节
- 添加了详细的开发、构建、辅助命令说明和使用指南
2026-01-27 17:53:54 +08:00

102 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# cutejava-ui
## 前端模板
初始模板基于: [https://github.com/PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
模板文档: [https://panjiachen.github.io/vue-element-admin-site/zh/guide/](https://panjiachen.github.io/vue-element-admin-site/zh/guide/)
## 快速开始
#### 环境要求
**推荐 node 版本:16**
#### 安装依赖
``` bash
# 安装依赖(依赖python)
npm install --registry https://registry.npmmirror.com
```
#### 启动服务
```bash
# 启动服务 localhost:8013
npm run dev
# (或) 启动服务 localhost:8013
IDEA -> Current File -> Edit Configurations... -> Add New Configuration -> npm -> Script选dev -> Apply -> Ok
# 构建生产环境
npm run build:prod
# 本地预览生产环境
npm run preview
```
## 命令说明
#### 开发相关
```shell
# 启动本地开发服务器,默认端口 8013,支持热重载
npm run dev
# Windows 系统启动开发服务器,设置 OpenSSL 兼容性选项
npm run dev-win
# Linux 系统启动开发服务器,设置 OpenSSL 兼容性选项
npm run dev-linux
```
#### 构建相关
```shell
# 构建开发环境版本,输出到 dist 目录
npm run build:dev
# 构建预发布环境版本,输出到 dist 目录
npm run build:stage
# 构建生产环境版本,输出到 dist 目录
npm run build:prod
# 构建生产环境版本(无特定模式)
npm run build:production
```
#### 辅助命令
```shell
# 预览构建后的静态文件,启动本地服务器查看构建结果
npm run preview
# 检查 src 目录下 .js 和 .vue 文件的代码规范
npm run lint
# 运行单元测试,先清除缓存再执行测试
npm run test:unit
# 优化 src/assets/icons/svg 目录下的 SVG 文件
npm run svgo
# 使用 plop 创建新文件模板
npm run new
```
## 常见问题
1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题
解决方案:
```
1. 单独安装:npm install --unsafe-perm node-sass
2. 直接使用:npm install --unsafe-perm
```
2、加速node-sass安装
https://www.ydyno.com/archives/1219.html