Awesome
<div align="center"> <img src="https://cdn.jsdelivr.net/gh/easy-temps/easy-static/cover.png" alt="cover" /> <h1 align="center">vue3-vant-mobile</h1>English / 简体中文
An mobile web apps template based on the Vue 3 ecosystem.
一个基于 Vue 3 生态系统的移动 web 应用模板,帮助你快速完成业务开发。
<p> <img src="https://img.shields.io/github/license/easy-temps/vue3-vant-mobile" alt="license" /> <img src="https://img.shields.io/github/package-json/v/easy-temps/vue3-vant-mobile" alt="version" /> <img src="https://img.shields.io/github/repo-size/easy-temps/vue3-vant-mobile" alt="repo-size" /> <img src="https://img.shields.io/github/languages/top/easy-temps/vue3-vant-mobile" alt="languages" /> <img src="https://img.shields.io/github/issues-closed/easy-temps/vue3-vant-mobile" alt="issues" /> </p><a href="https://vue3-vant-mobile.netlify.app">🖥 Live Demo</a>
</div> <br>Features
-
📲 PWA
-
🎨 UnoCSS - the instant on-demand atomic CSS engine
-
🔥 Use the new
<script setup>
syntax -
📥 APIs auto importing - use Composition API and others directly
-
💪 TypeScript, of course
-
⚙️ Unit Testing with Vitest
-
💾 Mock server Support
-
🌈 Git hooks - lint and commit
-
🪶 Vant - Vue UI library for mobile web apps
-
🔭 vConsole - the developer tool for mobile web page
-
📱 Browser adaptation - use viewport vw/vh units
-
💻 Desktop optimization - the mobile area
-
🌓 Dark Mode Support
-
🛡️ Configure ESM as default
-
☁️ Deploy on Netlify, zero-config
Pre-packed
UI Frameworks
- UnoCSS - The instant on-demand atomic CSS engine
@unocss/preset-rem-to-px
- Converts rem to px for all utilitieseslint-plugin-unocss
- ESLint plugin for UnoCSS
- Vant - Vue UI library for mobile web apps
vant-touch-emulator
- Simulate mobile touch events on the desktopvant-use
- Built-in composition APIs of Vant
Plugins
- Vue Router
unplugin-vue-router
- file system based routing
- Pinia - Intuitive, type safe, light and flexible Store for Vue using the composition api
pinia-plugin-persistedstate
- Configurable persistence and rehydration of Pinia stores
- Vue I18n - Internationalization
unplugin-vue-i18n
- unplugin for Vue I18n
- unplugin-vue-components - components auto import
- unplugin-auto-import - Directly use Vue Composition API and others without importing
- vite-plugin-vconsole - A lightweight, extendable front-end developer tool for mobile web page
- vite-plugin-mock-dev-server - Vite Plugin for API mock dev server
- postcss-mobile-forever - To adapt different displays by one mobile viewport
- vite-plugin-vue-devtools - Designed to enhance the Vue developer experience
- vueuse - collection of useful composition APIs
- @unhead/vue - manipulate document head reactively
- vite-plugin-pwa - PWA
- vite-plugin-sitemap - sitemap and robots generator
Coding Style
- Use Composition API with
<script setup>
SFC syntax - ESLint with @antfu/eslint-config, single quotes, no semi
Dev tools
- TypeScript
- Vitest - Unit testing powered by Vite
- pnpm - fast, disk space efficient package manager
- Netlify - zero-config deployment
- VS Code Extensions
- Volar - Vue 3
<script setup>
IDE support - Unocss - UnoCSS for VS Code
- Goto Alias - Go to Definition following alias redirections
- Iconify IntelliSense - Icon inline display and autocomplete
- File Nesting - Config of File Nesting for VS Code
- i18n Ally - All in one i18n support
- ESLint - Eslint support
- Better JSON5 - JSON5 support
- Volar - Vue 3
Try it now
vue3-vant-mobile requires Node 18+
GitHub Template
Create a repo from this template on GitHub
Clone to local
If you prefer to do it manually with the cleaner git history
npx tiged easy-temps/vue3-vant-mobile my-mobile-app
cd my-mobile-app
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
Checklist
When you use this template, try follow the checklist to update your info properly
- Change the author name in
LICENSE
- Change the title in
index.html
- Change the hostname in
vite.config.ts
- Change the favicon in
public
- Clean up the READMEs and remove routes
And, enjoy :)
Usage
Development
Just run and visit http://localhost:3000
pnpm dev
Build
To build the App, run
pnpm build
And you will see the generated file in dist
that ready to be served.
Deploy on Netlify
Go to Netlify and select your clone, OK
along the way, and your App will be live in a minute.
Community 👏
We recommend that issue be used for problem feedback, or Wechat group.
Donation ☕
<h2 align="center">💝 Our Sponsors 💝</h2> <p align="center"> Your sponsorship will help us continue to iterate on this exciting project! 🚀 </p> <p align="center"> <a href="https://github.com/keyFeng"><img src="https://avatars.githubusercontent.com/u/52267976?v=4" width="60px" alt="keyFeng" /></a> <a href="https://github.com/ljt990218"><img src="https://avatars.githubusercontent.com/u/50509815?v=4" width="60px" alt="ljt990218" /></a> <a href="https://github.com/heked"><img src="https://avatars.githubusercontent.com/u/14127731?v=4" width="60px" alt="heked" /></a> <a href="https://github.com/topcnm"><img src="https://avatars.githubusercontent.com/u/8057893?v=4" width="60px" alt="topcnm" /></a> <a href="https://github.com/qiyue2015"><img src="https://avatars.githubusercontent.com/u/11554433?v=4" width="60px" alt="qiyue2015" /></a> </p> <h2 align="center"> 💪 Contributors 💪 </h2> <p align="center"> Our contributors have made this project better. Thank you! 🙏 </p> <p align="center"> <a href="https://github.com/CharleeWa"><img src="https://avatars.githubusercontent.com/u/22477554?v=4" width="60px" alt="CharleeWa" /></a> <a href="https://github.com/ljt990218"><img src="https://avatars.githubusercontent.com/u/50509815?v=4" width="60px" alt="ljt990218" /></a> <a href="https://github.com/wswmsword"><img src="https://avatars.githubusercontent.com/u/26893092?v=4" width="60px" alt="wswmsword" /></a> <a href="https://github.com/weiq"><img src="https://avatars.githubusercontent.com/u/1697158?v=4" width="60px" alt="weiq" /></a> <a href="https://github.com/SublimeCT"><img src="https://avatars.githubusercontent.com/u/20380890?v=4" width="60px" alt="SublimeCT" /></a> <a href="https://github.com/ReginYuan"><img src="https://avatars.githubusercontent.com/u/49477488?v=4" width="60px" alt="ReginYuan" /></a> <a href="https://github.com/smartsf"><img src="https://avatars.githubusercontent.com/u/19995400?v=4" width="60px" alt="smartsf" /></a> <a href="https://github.com/Kysen777"><img src="https://avatars.githubusercontent.com/u/63892082?v=4" width="60px" alt="Kysen777" /></a> <a href="https://github.com/Leezon"><img src="https://avatars.githubusercontent.com/u/38120280?v=4" width="60px" alt="Leezon" /></a> <a href="https://github.com/AlphaYoung111"><img src="https://avatars.githubusercontent.com/u/54132313?v=4" width="60px" alt="AlphaYoung111" /></a> <a href="https://github.com/leo4developer"><img src="https://avatars.githubusercontent.com/u/15160478?v=4" width="60px" alt="leo4developer" /></a> <a href="https://github.com/InsHomePgup"><img src="https://avatars.githubusercontent.com/u/47906083?v=4" width="60px" alt="InsHomePgup" /></a> <a href="https://github.com/wowping"><img src="https://avatars.githubusercontent.com/u/137802961?v=4" width="60px" alt="wowping" /></a> <a href="https://github.com/ChunyuPCY"><img src="https://avatars.githubusercontent.com/u/21986942?v=4" width="60px" alt="ChunyuPCY" /></a> <a href="https://github.com/qiyue2015"><img src="https://avatars.githubusercontent.com/u/11554433?v=4" width="60px" alt="qiyue2015" /></a> <a href="https://github.com/pyQianYi"><img src="https://avatars.githubusercontent.com/u/57526688?v=4" width="60px" alt="pyQianYi" /></a> <a href="https://github.com/xyy94813"><img src="https://avatars.githubusercontent.com/u/17971352?v=4" width="60px" alt="xyy94813" /></a> <a href="https://github.com/faukwaa"><img src="https://avatars.githubusercontent.com/u/133618995?v=4" width="60px" alt="faukwaa" /></a> <a href="https://github.com/chensongni"><img src="https://avatars.githubusercontent.com/u/18071921?v=4" width="60px" alt="chensongni" /></a> <a href="https://github.com/csheng-github"><img src="https://avatars.githubusercontent.com/u/88492404?v=4" width="60px" alt="chensongni" /></a> </p>License
MIT License