å¨çº¿é¢è§ | å®æ¹ææ¡£
## 项ç®ä»ç»
[mall-admin](https://gitee.com/youlaiorg/mall-admin) æ¯åºäº [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) å级ç Vue3 çæ¬ææ¥åå管çå端工ç¨ï¼ä½¿ç¨å端主æµææ¯æ Vue3 + Vite4 + TypeScript5 + Vue Router + Pinia + Volar + Element Plus çï¼å®ç°åè½å
æ¬ä¸éäºå¨ææéè·¯ç±ãæé®æéæ§å¶ãå½é
åã主é¢å¤§å°åæ¢çã
## 项ç®ä¼å¿
- åºäº vue-element-admin å级ç Vue3 çæ¬ ï¼ææä¸æï¼åå°å¦ä¹ ææ¬ï¼
- ä¸å¥å®æ´éé
çå¾®æå¡æéç³»ç»çº¿ä¸æ¥å£ï¼ä¼ä¸çº§çå®åå端æ¥å
¥åºæ¯ï¼é Mock æ°æ®ï¼
- åè½å
¨é¢ï¼å½é
åãå¨æè·¯ç±ãæé®æéã主é¢å¤§å°åæ¢ãEchartsãwangEditorï¼
- TypeScript å
¨é¢æ¯æï¼å
æ¬ç»ä»¶å API è°ç¨å±é¢ï¼
- ä¸»æµ Vue3 çæåå端ææ¯æ ï¼å¸¸ç¨ç»ä»¶æç®å°è£
ï¼
- ä» 0 å° 1 ç项ç®ææ¡£æ¯æï¼
- å
¨æ ææ¯æ¯æ: å¾®æå¡æ¥å£ãVue3 管çå端ãuni-app 移å¨ç«¯å K8S æç»éæ交ä»ï¼
## ææ¯æ
| ææ¯æ | æè¿° | å®ç½ |
| ------------ | -------------------------------------- | ------------------------------------ |
| Vue3 | æ¸è¿å¼ JavaScript æ¡æ¶ | https://v3.cn.vuejs.org/ |
| TypeScript | JavaScript çä¸ä¸ªè¶
é | https://www.tslang.cn/ |
| Vite | å端å¼åä¸æ建工å
· | https://cn.vitejs.dev/ |
| Element Plus | åºäº Vue 3ï¼é¢å设计å¸åå¼åè
çç»ä»¶åº | https://element-plus.gitee.io/zh-CN/ |
| Pinia | æ°ä¸ä»£ç¶æ管çå·¥å
· | https://pinia.vuejs.org/ |
| Vue Router | Vue.js çå®æ¹è·¯ç± | https://router.vuejs.org/zh/ |
## 项ç®é¢è§
å¨çº¿é¢è§å°å: [admin.youlai.tech](http://admin.youlai.tech)
| ![æ§å¶å°](https://www.youlai.tech/files/blog/dashboard.png) | ![å½é
å](https://www.youlai.tech/files/blog/i18n.gif) |
| ----------------------------------------------------------- | --------------------------------------------------------- |
| ![èå管ç](https://www.youlai.tech/files/blog/menu.png) | ![è§è²ç®¡ç](https://www.youlai.tech/files/blog/role.png) |
| ![åå管ç](https://www.youlai.tech/files/blog/goods.png) | ![åºå设置](https://www.youlai.tech/files/blog/stock.png) |
## 项ç®å°å
| | Gitee | Github | GitCode |
| ------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------- |
| å¼æºç»ç» | [ææ¥å¼æºç»ç»](https://gitee.com/youlaiorg) | [ææ¥å¼æºç»ç»](https://github.com/youlaitech) | [ææ¥å¼æºç»ç»](https://gitcode.net/youlai) |
| ææ¯å¢é | [ææ¥ææ¯å¢é](https://gitee.com/youlaitech) | [ææ¥ææ¯å¢é](https://github.com/youlaitech) | - |
| å端 | [youlai-mall](https://gitee.com/youlaiorg/youlai-mall) | [youlai-mall](https://github.com/youlaitech/youlai-mall) | [youlai-mall](https://gitcode.net/youlai/youlai-mall) |
| 管çå端 | [mall-admin](https://gitee.com/youlaiorg/mall-admin) | [mall-admin](https://github.com/youlaitech/mall-admin) | [mall-admin](https://gitcode.net/youlai/mall-admin) |
| å°ç¨åº/H5/移å¨ç«¯ | [mall-app](https://gitee.com/youlaiorg/mall-app) | [mall-app](https://github.com/youlaitech/mall-app) | [mall-app](https://gitcode.net/youlai/mall-app) |
| vue3-element-admin | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | - |
## å¯å¨é¨ç½²
### ç¯å¢åå¤
- å®è£
Node
çæ¬ï¼16+
- å¼åå·¥å
·
VSCode
- å¿
è£
æ件
- Vue Language Features (Volar)
- TypeScript Vue Plugin (Volar)
### 项ç®å¯å¨
> é»è®¤å端æ¥å£å°å http://localhost:9999 ï¼å¦éæ¿æ¢æ¥å£å°åï¼æ¿æ¢ .env.development ç代çç®æ å°å VITE_APP_TARGET_URL çå¼ä¸ºæ¨çæ¥å£å°åã
1. pnpm install
2. pnpm run dev
3. æµè§å¨è®¿é® http://localhost:9527
### 项ç®é¨ç½²
- æ¬å°æå
```
npm run build:prod
```
çæçéææ件ä½äºé¡¹ç®æ ¹ç®å½ dist æ件夹ä¸
- nginx.cofig é
ç½®
```
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html/web;
index index.html index.htm;
}
# 代ç转å请æ±è³ç½å
³ï¼prod-apiæ è¯è§£å³è·¨åé®é¢
location /prod-api/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://api.youlai.tech/;
}
}
```
## 交æµç¾¤ ð
> å
³æ³¨ãææ¥ææ¯ãå
¬ä¼å·ï¼è·å交æµç¾¤äºç»´ç ã
>
> å¦æ交æµç¾¤çäºç»´ç è¿æï¼å æ微信ï¼å¤æ³¨ãå端ãããå端ãæãå
¨æ ãå³å¯ã
>
> 为äºé¿å
è¥é广å人群混å
¥ï¼æ¤ä¸¾æ å¥ï¼æç解ï¼
| å
¬ä¼å· | 交æµç¾¤ |
| ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| | |