1.0.1 • Published 3 months ago
syz-vue-components v1.0.1
技术栈
技术栈 | 描述 | 官网 |
---|---|---|
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/ |
环境要求
Node 环境
版本:16+
开发工具
VSCode
必装插件
- Vue Language Features (Volar)
- TypeScript Vue Plugin (Volar)
项目启动
- npm install
- npm run dev
- 访问 http://localhost:3000
项目部署
本地打包
npm run build:prod
生成的静态文件位于项目根目录 dist 文件夹下
上传文件
创建
/mnt/nginx/html
目录,将打包生成 dist 下的所有文件拷贝至此工作目录下nginx.cofig 配置
server { listen 80; server_name localhost; location / { root /mnt/nginx/html; index index.html index.htm; } # 代理转发请求至网关,prod-api标识解决跨域,vapi.youlai.tech 线上接口地址,注意后面/ location /prod-api/ { proxy_pass http://vapi.youlai.tech/; } }