|
|
2 years ago | |
|---|---|---|
| .husky | 2 years ago | |
| .vscode | 2 years ago | |
| build | 2 years ago | |
| mock | 2 years ago | |
| public | 2 years ago | |
| src | 2 years ago | |
| tests | 2 years ago | |
| types | 2 years ago | |
| .editorconfig | 2 years ago | |
| .env | 2 years ago | |
| .env.development | 2 years ago | |
| .env.production | 2 years ago | |
| .env.test | 2 years ago | |
| .eslintignore | 2 years ago | |
| .eslintrc.js | 2 years ago | |
| .gitignore | 2 years ago | |
| .gitpod.yml | 2 years ago | |
| .prettierignore | 2 years ago | |
| .stylelintignore | 2 years ago | |
| CHANGELOG.md | 2 years ago | |
| README.md | 2 years ago | |
| commitlint.config.js | 2 years ago | |
| index.html | 2 years ago | |
| package.json | 2 years ago | |
| postcss.config.js | 2 years ago | |
| prettier.config.js | 2 years ago | |
| stylelint.config.js | 2 years ago | |
| tsconfig.json | 2 years ago | |
| vite.config.ts | 2 years ago | |
| windi.config.ts | 2 years ago |
Vue tuoren admin 血透管理系统
Vue Tuoren Admin 是一个中后台模版, vue3, vite2, TypeScript 等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
TypeScript基本语法获取项目代码
git clone https://github.com/anncwb/vue-vben-admin.git
安装依赖
cd vue-vben-admin
pnpm install
运行
pnpm serve
打包
pnpm build
"scripts": {
# 安装依赖
"bootstrap": "yarn install",
# 运行项目
"serve": "npm run dev",
# 运行项目
"dev": "vite",
# 构建项目
"build": "vite build && esno ./build/script/postBuild.ts",
# 清空缓存后构建项目
"build:no-cache": "yarn clean:cache && npm run build",
# 生成打包分析,在 `Mac OS` 电脑上执行完成后会自动打开界面,在 `Window` 电脑上执行完成后需要打开 `./build/.cache/stats.html` 查看
"report": "cross-env REPORT=true npm run build",
# 类型检查
"type:check": "vue-tsc --noEmit --skipLibCheck",
# 预览打包后的内容(先打包在进行预览)
"preview": "npm run build && vite preview",
# 直接预览本地 dist 文件目录
"preview:dist": "vite preview",
# 生成 ChangeLog
"log": "conventional-changelog -p angular -i CHANGELOG.md -s",
# 删除缓存
"clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
# 删除 node_modules (`window` 系统手动删除该目录较慢,可以使用该命令来进行删除)
"clean:lib": "rimraf node_modules",
# 执行 eslint 校验,并修复部分问题
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
# 执行 prettier 格式化(该命令会对项目所有代码进行 prettier 格式化,请谨慎执行)
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
# 执行 stylelint 格式化
"lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged",
# 对打包结果进行 gzip 测试
"test:gzip": "http-server dist --cors --gzip -c-1",
# 对打包目录进行 brotli 测试
"test:br": "http-server dist --cors --brotli -c-1",
# 重新安装依赖,见下方说明
"reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
"install:husky": "is-ci || husky install",
# 生成图标集,见下方说明
"gen:icon": "esno ./build/generate/icon/index.ts",
"postinstall": "npm run install:husky"
},
.
├── build # 打包脚本相关
│ ├── config # 配置文件
│ ├── generate # 图标生成器,基本使用 antdesign 和 iconfont 上图标
│ ├── script # 脚本
│ └── vite # vite配置
├── mock # mock文件夹/使用 apifox 进行替代
├── public # 公共静态资源目录
├── src # 主目录
│ ├── api # 接口文件
│ ├── assets # 资源文件
│ │ ├── icons # icon sprite 图标文件夹
│ │ ├── images # 项目存放图片的文件夹
│ │ └── svg # 项目存放svg图片的文件夹
│ ├── components # 公共组件
│ ├── design # 样式文件
│ ├── directives # 指令
│ ├── enums # 枚举/常量
│ ├── hooks # hook
│ │ ├── component # 组件相关hook
│ │ ├── core # 基础hook
│ │ ├── event # 事件相关hook
│ │ ├── setting # 配置相关hook
│ │ └── web # web相关hook
│ ├── layouts # 布局文件
│ │ ├── default # 默认布局
│ │ ├── iframe # iframe布局
│ │ └── page # 页面布局
│ ├── locales # 多语言
│ ├── logics # 逻辑
│ ├── main.ts # 主入口
│ ├── router # 路由配置
│ ├── settings # 项目配置
│ │ ├── componentSetting.ts # 组件配置
│ │ ├── designSetting.ts # 样式配置
│ │ ├── encryptionSetting.ts # 加密配置
│ │ ├── localeSetting.ts # 多语言配置
│ │ ├── projectSetting.ts # 项目配置
│ │ └── siteSetting.ts # 站点配置
│ ├── store # 数据仓库
│ ├── utils # 工具类
│ └── views # 页面
│ ├── bus # 业务页面
│ ├── sys # 系统页面
├── test # 测试
│ └── server # 测试用到的服务
│ ├── api # 测试服务器
│ ├── upload # 测试上传服务器
│ └── websocket # 测试ws服务器
├── types # 类型文件
├── vite.config.ts # vite配置文件
└── windi.config.ts # windcss配置文件
feat 增加新功能fix 修复问题/BUGstyle 代码风格相关无影响运行结果的perf 优化/性能提升refactor 重构revert 撤销修改test 测试相关docs 文档/注释chore 依赖更新/脚手架配置修改等workflow 工作流改进ci 持续集成types 类型定义文件更改wip 开发中If these plugins are helpful to you, you can give a star support
本地开发推荐使用Chrome 80+ 浏览器
支持现代浏览器, 不支持 IE
![]() | IE![]() | Edge
![]() | Firefox
|---|

