2025-01-08 05:26:12 +00:00
|
|
|
|
<!-- markdownlint-disable MD033 MD041 -->
|
|
|
|
|
|
|
|
|
|
<div id="top" align="center">
|
|
|
|
|
|
|
|
|
|
<img src="https://cdn.jsdelivr.net/gh/easy-temps/easy-static/cover.png" alt="cover" />
|
|
|
|
|
|
|
|
|
|
<h1 align="center">nuxt-vant-mobile</h1>
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
一个基于 Nuxt _⁴_ 生态系统的移动端 Web 应用模板。
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
一个基于 Nuxt _⁴_ 生态系统的移动端 Web 应用模板,帮助你快速完成业务开发。
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
<img src="https://img.shields.io/github/license/easy-temps/nuxt-vant-mobile" alt="license" />
|
|
|
|
|
<img src="https://img.shields.io/github/package-json/v/easy-temps/nuxt-vant-mobile" alt="version" />
|
|
|
|
|
<img src="https://img.shields.io/github/repo-size/easy-temps/nuxt-vant-mobile" alt="repo-size" />
|
|
|
|
|
<img src="https://img.shields.io/github/languages/top/easy-temps/nuxt-vant-mobile" alt="languages" />
|
|
|
|
|
<img src="https://img.shields.io/github/issues-closed/easy-temps/nuxt-vant-mobile" alt="issues" />
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
[文档](https://easy-temps.github.io/easy-docs/nuxt3-vant-mobile/) / [交流](https://github.com/easy-temps/vue3-vant-mobile/issues/56) / [反馈](https://github.com/easy-temps/nuxt-vant-mobile/issues)
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
🖥 <a href="https://nuxt-vant-mobile.netlify.app">在线预览</a>
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
|
|
|
|
[](https://app.netlify.com/sites/nuxt-vant-mobile/deploys)
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
## 特性
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 💚 [Nuxt](https://nuxt.com/) - SSR、ESR、基于文件的路由、组件自动导入、模块等
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- ⚡️ Vite - 即时热更新
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 🎨 [UnoCSS](https://github.com/unocss/unocss) - 即时按需原子化 CSS 引擎
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 😃 使用纯 CSS 的任意图标集,由 [UnoCSS](https://github.com/unocss/unocss) 提供支持
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 🔥 `<script setup>` 语法
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 🌍 [国际化支持](./i18n/locales)
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 🍍 [使用 Pinia 进行状态管理](https://github.com/vuejs/pinia),查看 [./app/composables/counter.ts](./app/composables/counter.ts)
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 📑 [布局系统](./app/layouts)
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 📥 API 自动导入 - 用于 Composition API 和自定义组合式函数
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- 🦾 当然支持 TypeScript
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- ☁️ 零配置部署在 [Netlify](https://www.netlify.com) 上
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
## Nuxt 模块
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
- [Vant](https://github.com/youzan/vant) - 移动端 Vue UI 库
|
|
|
|
|
- [Nuxt ESLint](https://github.com/nuxt/eslint) - Nuxt 的 ESLint 相关包集合
|
|
|
|
|
- [i18n](https://github.com/nuxt-modules/i18n) - Nuxt 的国际化模块
|
|
|
|
|
- [ColorMode](https://github.com/nuxt-modules/color-mode) - 支持自动检测的深色和浅色模式
|
|
|
|
|
- [UnoCSS](https://github.com/unocss/unocss) - 即时按需原子化 CSS 引擎
|
|
|
|
|
- [Pinia](https://github.com/vuejs/pinia) - 直观、类型安全、轻量且灵活的 Vue 状态管理
|
|
|
|
|
- [Pinia Persistedstate](https://github.com/prazdevs/pinia-plugin-persistedstate) - 可配置的 Pinia 存储持久化和重新激活
|
|
|
|
|
- [DevTools](https://github.com/nuxt/devtools) - 释放 Nuxt 开发者体验
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
|
|
|
|
## IDE
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
我们推荐使用 [VS Code](https://code.visualstudio.com/) 搭配 [Volar](https://github.com/johnsoncodehk/volar) 以获得最佳体验(如果你安装了 [Vetur](https://vuejs.github.io/vetur/),建议禁用它)
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
## 立即尝试
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
### GitHub 模板
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
[从 GitHub 上使用此模板创建仓库](https://github.com/easy-temps/nuxt-vant-mobile/generate)
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
### 克隆到本地
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
如果你更喜欢手动操作并保持更清晰的 git 历史
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
npx tiged easy-temps/nuxt-vant-mobile my-nuxt-app
|
|
|
|
|
cd my-nuxt-app
|
2025-01-08 05:30:14 +00:00
|
|
|
|
pnpm i # 如果你没有安装 pnpm,请运行:npm install -g pnpm
|
2025-01-08 05:26:12 +00:00
|
|
|
|
```
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
## 使用方法
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
### 开发
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
只需运行并访问 <http://localhost:3000>
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
pnpm dev
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
### 构建
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
要构建应用,运行
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
pnpm build
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-08 05:30:14 +00:00
|
|
|
|
你将在 `.output` 目录中看到生成的可以部署的文件。
|
2025-01-08 05:26:12 +00:00
|
|
|
|
|