https://github.com/wp993080086/vite-h5-template
一个开箱即用基于vue3和ts的移动端H5项目模板。
https://github.com/wp993080086/vite-h5-template
nprogress pinia sass typescript vant vite vue vue-router
Last synced: 2 months ago
JSON representation
一个开箱即用基于vue3和ts的移动端H5项目模板。
- Host: GitHub
- URL: https://github.com/wp993080086/vite-h5-template
- Owner: wp993080086
- Created: 2022-05-10T08:25:07.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T10:17:10.000Z (about 1 year ago)
- Last Synced: 2025-01-22T12:30:57.447Z (4 months ago)
- Topics: nprogress, pinia, sass, typescript, vant, vite, vue, vue-router
- Language: TypeScript
- Homepage:
- Size: 250 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README









# ⚡️ 简介
一个开箱即用,基于 `vite 2` + `typeScript` + `vue 3` + `vant 3` + `pinia` + `vue-router 4` + `axios` 的H5项目模板。
# 🚀 开发
1. 安装
```
npm install
```2. 运行
```
npm run serve
```# 📦️ 多环境打包
- 测试环境打包
```
npm run build_test
```- 生产环境打包
```
npm run build
```# 🔧 代码检查修复
- 格式检查
```
npm run lint
```- 自动修复
```
npm run lint-fix
```# 📚 目录
```
├─ .env.xxx // 各环境的配置文件
├─ .eslintrc.js // eslint配置
├─ postcss.config.js // rem配置
├─ vite.config.ts // 项目配置
├─ tsconfig.json // ts配置
├─ index.html // 入口文件
└─ src
│─ App.vue // 根容器
│─ main.ts
│
├─ components // 组件
│
├─ config // 项目级配置
│ │
│ └─index.ts
│
├─ pages // 页面
│
├─ router // 路由
│
├─ servers // 接口
│ │
│ │─ request.ts // 封装
│ └─ api // 接口
│
├─ assets // 静态资源
│
├─ store // pinia
│
├─ types // ts类型定义
│
└─ utils // 工具库
│ │ index.ts
│ │ loading.ts // loading封装
│ │ toast.ts // 弹窗封装
│ └─md5
└─
```