|
@@ -1,298 +1,229 @@
|
|
<div align="center">
|
|
<div align="center">
|
|
- <a href="https://github.com/xiangshu233/vue3-vant4-mobile">
|
|
|
|
- <img alt="Vue3Vant4MobileLogo" width="200" height="200" src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2022/07/logo.svg">
|
|
|
|
- </a>
|
|
|
|
-</div><br><br>
|
|
|
|
|
|
|
|
-<p align="center">
|
|
|
|
- <img src="https://img.shields.io/github/license/xiangshu233/vue3-vant4-mobile" alt="license" />
|
|
|
|
- <img src="https://img.shields.io/github/package-json/v/xiangshu233/vue3-vant4-mobile" alt="version" />
|
|
|
|
- <img src="https://img.shields.io/github/repo-size/xiangshu233/vue3-vant4-mobile" alt="repo-size" />
|
|
|
|
- <img src="https://img.shields.io/github/languages/top/xiangshu233/vue3-vant4-mobile" alt="languages" />
|
|
|
|
- <img src="https://img.shields.io/github/issues-closed/xiangshu233/vue3-vant4-mobile" alt="issues" />
|
|
|
|
|
|
+<img src="https://cdn.jsdelivr.net/gh/easy-temps/easy-static/cover.png" alt="cover" />
|
|
|
|
+
|
|
|
|
+<h1 align="center">vue3-vant-mobile</h1>
|
|
|
|
+
|
|
|
|
+English / [简体中文](./README.zh-CN.md)
|
|
|
|
+
|
|
|
|
+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>
|
|
</p>
|
|
|
|
|
|
-<h1 align="center">vue3-vant4-mobile</h1>
|
|
|
|
|
|
+[文档](https://easy-temps.github.io/easy-docs/vue3-vant-mobile/) / [交流](https://github.com/easy-temps/vue3-vant-mobile/issues/56) / [反馈](https://github.com/easy-temps/vue3-vant-mobile/issues)
|
|
|
|
|
|
-## Stargazers over time
|
|
|
|
|
|
+<a href="https://vue3-vant-mobile.netlify.app">Live Demo</a>
|
|
|
|
|
|
-[](https://starchart.cc/xiangshu233/vue3-vant4-mobile)
|
|
|
|
|
|
+[](https://app.netlify.com/sites/vue3-vant-mobile/deploys)
|
|
|
|
|
|
-## 介绍
|
|
|
|
|
|
+</div>
|
|
|
|
|
|
-👋👋👋 Vue3 Vant4 Mobile 使用了最新的 `Vue3.4`、`Vite5`、`Vant4`、`Pinia`、`TypeScript`、`UnoCSS` 等主流技术开发,集成 `Dark Mode`(暗黑)模式和系统主题色,并且持久化保存,集成 `Mock` 数据,顺便写了登录/注册/找回密码 页面(包括逻辑),只需替换你的 API 即可,另外页面均可以 `<keep-alive>`,随便写了个包含 `NavBar`、`TabBar` 的 Layout,集成了 `Axios`、`useECharts`、`IconSvg`。
|
|
|
|
|
|
+<br>
|
|
|
|
|
|
-项目使用了 [antfu](https://github.com/antfu) 大佬的 [antfu/eslint-config](https://github.com/antfu/eslint-config) 作为代码规范检查工具,摆脱繁琐无聊的 Eslint 配置,配合 `cz-git`、 `lint-staged`、`simple-git-hooks`可对暂存区代码提交校验,代码风格不合格可打断提交,保证多人协作开发时上游 Git 库的干净。
|
|
|
|
|
|
+## Features
|
|
|
|
|
|
-现在你可以在此之上直接开发你的业务代码!希望你能喜欢!
|
|
|
|
|
|
+- ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite 5](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [esbuild](https://github.com/evanw/esbuild) - born with fastness
|
|
|
|
|
|
-## 截图预览
|
|
|
|
|
|
+- 🗂 [File based routing](./src/router)
|
|
|
|
|
|
-<table>
|
|
|
|
- <tr>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2022/10/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20221022091917.png" width="400" alt="登录页面" /></td>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172041924.png" width="400" alt="主控台页(首页)" /></td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172042123.png" width="400" alt="消息页(图标页)" /></td>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172042858.png" width="400" alt="我的(我的信息页面)" /></td>
|
|
|
|
- </tr>
|
|
|
|
-</table>
|
|
|
|
|
|
+- 📦 [Components auto importing](./src/components)
|
|
|
|
|
|
-<details>
|
|
|
|
-<summary>展开预览暗黑模式下的界面截图</summary>
|
|
|
|
|
|
+- 🍍 [State Management via Pinia](https://pinia.vuejs.org)
|
|
|
|
|
|
-<table>
|
|
|
|
- <tr>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172036432.png" width="400" alt="登录页面(暗黑模式)" /></td>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172038413.png" width="400" alt="主控台页(暗黑模式)" /></td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172039913.png" width="400" alt="我的页面(暗黑模式)" /></td>
|
|
|
|
- <td><img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2023/12/202403172040019.png" width="400" alt="主题设置页面(暗黑模式)" /></td>
|
|
|
|
- </tr>
|
|
|
|
-</table>
|
|
|
|
|
|
+- 📲 [PWA](https://github.com/antfu/vite-plugin-pwa)
|
|
|
|
|
|
-</details>
|
|
|
|
|
|
+- 🎨 [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine
|
|
|
|
|
|
-## 线上预览
|
|
|
|
|
|
+- 🌍 [I18n ready](./src/locales)
|
|
|
|
|
|
-预览链接:_[https://vvmobile.xiangshu233.cn/](https://vvmobile.xiangshu233.cn/)_
|
|
|
|
|
|
+- 🔥 Use the [new `<script setup>` syntax](https://github.com/vuejs/rfcs/pull/227)
|
|
|
|
|
|
-账号:admin,密码:123456
|
|
|
|
|
|
+- 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly
|
|
|
|
|
|
-账号:test,密码:123456
|
|
|
|
|
|
+- 💪 TypeScript, of course
|
|
|
|
|
|
-或者扫描以下二维码进入手机演示
|
|
|
|
|
|
+- ⚙️ Unit Testing with [Vitest](https://github.com/vitest-dev/vitest)
|
|
|
|
|
|
-<p align="center">
|
|
|
|
- <img src="https://fastly.jsdelivr.net/gh/xiangshu233/blogAssets/2022/07/vue3-vant4-mobile-QR-code.png" width="200" />
|
|
|
|
-</p>
|
|
|
|
|
|
+- 💾 [Mock](https://github.com/pengzhanbo/vite-plugin-mock-dev-server) server Support
|
|
|
|
|
|
-## 基础知识
|
|
|
|
|
|
+- 🌈 Git [hooks](./.husky) - lint and commit
|
|
|
|
|
|
-- [Vite](https://cn.vitejs.dev/) - 熟悉 `Vite` 特性
|
|
|
|
-- [Vue3](https://v3.vuejs.org/) - 熟悉 `Vue3` 基础语法
|
|
|
|
-- [Vant4](https://youzan.github.io/vant/v4/#/zh-CN) - 掌握 `vant4` 组件基本使用
|
|
|
|
-- [Pinia](https://pinia.vuejs.org/) - 熟悉 `Pinia` 特性
|
|
|
|
-- [TypeScript](https://www.typescriptlang.org/) - 熟悉 `TypeScript` 基本语法
|
|
|
|
-- [Vue-Router-Next](https://router.vuejs.org/) - 熟悉 `Vue-Router`基本使用
|
|
|
|
-- [ECharts5](https://echarts.apache.org/handbook/zh/get-started/) - 熟悉 `Echarts` 基本使用
|
|
|
|
-- [Iconify](https://icones.js.org/) - 本项目推荐图标库,当然你也可以使用 `IconSvg`
|
|
|
|
-- [Postcss-Mobile-Forever](https://github.com/wswmsword/postcss-mobile-forever) - 了解手机端 `px` 转 `viewport` 插件的作用
|
|
|
|
-- [Lodash-es](https://www.lodashjs.com/) - `JS`高性能工具库
|
|
|
|
-- [UnoCSS](https://unocss.dev/) - 原子化 `CSS`,熟悉 `UnoCSS` 基本使用
|
|
|
|
-- [Mock.js](https://github.com/nuysoft/Mock) - 了解 `Mockjs` 基本语法
|
|
|
|
-- [ES6+](http://es6.ruanyifeng.com/) - 熟悉 `ES6` 基本语法
|
|
|
|
|
|
+- 🪶 [Vant](https://github.com/youzan/vant) - Vue UI library for mobile web apps
|
|
|
|
|
|
-## 关于 Icon 的使用
|
|
|
|
|
|
+- 🔭 [vConsole](https://github.com/vadxq/vite-plugin-vconsole) - the developer tool for mobile web page
|
|
|
|
|
|
-项目使用 `unocss` 的 `icon` [预设](https://unocss.dev/presets/icons) 作为系统 Icon
|
|
|
|
|
|
+- 📱 Browser adaptation - use viewport vw/vh units
|
|
|
|
|
|
-请遵循以下约定使用图标
|
|
|
|
|
|
+- 💻 [Desktop optimization](https://github.com/wswmsword/postcss-mobile-forever) - the mobile area
|
|
|
|
|
|
-- `<prefix><collection>-<icon>`
|
|
|
|
-- `<prefix><collection>:<icon>`
|
|
|
|
|
|
+- 🌓 Dark Mode Support
|
|
|
|
|
|
-```html
|
|
|
|
-<!-- A basic anchor icon from Phosphor icons -->
|
|
|
|
-<div class="i-ph-anchor-simple-thin" />
|
|
|
|
-<!-- An orange alarm from Material Design Icons -->
|
|
|
|
-<div class="i:mdi:alarm" />
|
|
|
|
-```
|
|
|
|
|
|
+- 🛡️ Configure [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) as default
|
|
|
|
|
|
-点击这里获取所有[可用的图标](https://icones.js.org/),找到想要的图标后点击复制 icon name 到 class 里即可
|
|
|
|
-
|
|
|
|
-> [!WARNING]
|
|
|
|
-> 记得加 `i-xxx` 前缀,从 icones 复制的 icon name 是没有 `i-` 前缀的
|
|
|
|
->
|
|
|
|
-> 更多详细使用请看 https://unocss.dev/presets/icons#icons-preset
|
|
|
|
-
|
|
|
|
-## 环境准备
|
|
|
|
-
|
|
|
|
-本地环境需要安装 [Pnpm](https://www.pnpm.cn/)、[Node.js](http://nodejs.org/) 和 [Git](https://git-scm.com/)
|
|
|
|
-
|
|
|
|
-- 必须使用 [pnpm>=8.6.10](https://www.pnpm.cn/),否则依赖可能安装不上。
|
|
|
|
-- [Node.js](http://nodejs.org/) 版本要求`18.x`以上,且不能为`13.x`版本,这里推荐 ` ^20.9.0 || >=21.1.0`。
|
|
|
|
-
|
|
|
|
-## VS Code 配套插件
|
|
|
|
-
|
|
|
|
-如果你使用的 IDE 是 [VS Code](https://code.visualstudio.com/)(推荐)的话,可以安装以下工具来提高开发效率及代码格式化
|
|
|
|
-
|
|
|
|
-- [UnoCSS](https://marketplace.visualstudio.com/items?itemName=antfu.unocss) - UnoCSS 提示插件
|
|
|
|
-- [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 开发必备
|
|
|
|
-- [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) - 用于 TypeScript 服务器的 Vue 插件
|
|
|
|
-- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - 脚本代码检查
|
|
|
|
-- [DotENV](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv) - `.env` 文件 高亮
|
|
|
|
-- [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens) - 更好的错误定位
|
|
|
|
-- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - 不同 IDE 维护一致的编码样式
|
|
|
|
-- [File Nesting Updater](https://marketplace.visualstudio.com/items?itemName=antfu.file-nesting) - 使用 VS Code 的文件嵌套功能使文件树更干净的配置
|
|
|
|
-- [Pretty TypeScript Errors](https://marketplace.visualstudio.com/items?itemName=antfu.file-nesting) - 使 VSCode 中的 TypeScript 错误更漂亮、更易于理解
|
|
|
|
-- [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree) - 在树视图中显示 TODO、FIXME 等注释标签
|
|
|
|
-- [Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces) - 突出显示尾随空格并立即将其删除
|
|
|
|
-
|
|
|
|
-## VS Code Eslint 支持(自动修复)
|
|
|
|
-
|
|
|
|
-安装 [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
|
|
-
|
|
|
|
-将以下设置添加到您的 `.vscode/settings.json` 中:
|
|
|
|
-
|
|
|
|
-```jsonc
|
|
|
|
-{
|
|
|
|
- // Enable the ESlint flat config support
|
|
|
|
- "eslint.experimental.useFlatConfig": true,
|
|
|
|
-
|
|
|
|
- // Disable the default formatter, use eslint instead
|
|
|
|
- "prettier.enable": false,
|
|
|
|
- "editor.formatOnSave": false,
|
|
|
|
-
|
|
|
|
- // Auto fix
|
|
|
|
- "editor.codeActionsOnSave": {
|
|
|
|
- "source.fixAll.eslint": "explicit",
|
|
|
|
- "source.organizeImports": "never"
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- // Silent the stylistic rules in you IDE, but still auto fix them
|
|
|
|
- "eslint.rules.customizations": [
|
|
|
|
- { "rule": "style/*", "severity": "off" },
|
|
|
|
- { "rule": "format/*", "severity": "off" },
|
|
|
|
- { "rule": "*-indent", "severity": "off" },
|
|
|
|
- { "rule": "*-spacing", "severity": "off" },
|
|
|
|
- { "rule": "*-spaces", "severity": "off" },
|
|
|
|
- { "rule": "*-order", "severity": "off" },
|
|
|
|
- { "rule": "*-dangle", "severity": "off" },
|
|
|
|
- { "rule": "*-newline", "severity": "off" },
|
|
|
|
- { "rule": "*quotes", "severity": "off" },
|
|
|
|
- { "rule": "*semi", "severity": "off" }
|
|
|
|
- ],
|
|
|
|
-
|
|
|
|
- // Enable eslint for all supported languages
|
|
|
|
- "eslint.validate": [
|
|
|
|
- "javascript",
|
|
|
|
- "javascriptreact",
|
|
|
|
- "typescript",
|
|
|
|
- "typescriptreact",
|
|
|
|
- "vue",
|
|
|
|
- "html",
|
|
|
|
- "markdown",
|
|
|
|
- "json",
|
|
|
|
- "jsonc",
|
|
|
|
- "yaml",
|
|
|
|
- "toml"
|
|
|
|
- ]
|
|
|
|
-}
|
|
|
|
-```
|
|
|
|
|
|
+- ☁️ Deploy on [Netlify](https://www.netlify.com), zero-config
|
|
|
|
+
|
|
|
|
+<br>
|
|
|
|
+
|
|
|
|
+## Pre-packed
|
|
|
|
+
|
|
|
|
+### UI Frameworks
|
|
|
|
+
|
|
|
|
+- [UnoCSS](https://github.com/antfu/unocss) - The instant on-demand atomic CSS engine
|
|
|
|
+ - [`@unocss/preset-rem-to-px`](https://github.com/unocss/unocss/tree/main/packages/preset-rem-to-px) - Converts rem to px for all utilities
|
|
|
|
+ - [`eslint-plugin-unocss`](https://github.com/devunt/eslint-plugin-unocss) - ESLint plugin for UnoCSS
|
|
|
|
+- [Vant](https://github.com/youzan/vant) - Vue UI library for mobile web apps
|
|
|
|
+ - [`vant-touch-emulator`](https://github.com/youzan/vant/tree/main/packages/vant-touch-emulator) - Simulate mobile touch events on the desktop
|
|
|
|
+ - [`vant-use`](https://github.com/youzan/vant/tree/main/packages/vant-use) - Built-in composition APIs of Vant
|
|
|
|
|
|
-## 使用
|
|
|
|
|
|
+### Plugins
|
|
|
|
+
|
|
|
|
+- [Vue Router](https://github.com/vuejs/router)
|
|
|
|
+ - [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - file system based routing
|
|
|
|
+- [Pinia](https://pinia.vuejs.org) - Intuitive, type safe, light and flexible Store for Vue using the composition api
|
|
|
|
+ - [`pinia-plugin-persistedstate`](https://github.com/prazdevs/pinia-plugin-persistedstate) - Configurable persistence and rehydration of Pinia stores
|
|
|
|
+- [Vue I18n](https://github.com/intlify/vue-i18n-next) - Internationalization
|
|
|
|
+ - [`unplugin-vue-i18n`](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n) - unplugin for Vue I18n
|
|
|
|
+- [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) - components auto import
|
|
|
|
+- [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import) - Directly use Vue Composition API and others without importing
|
|
|
|
+- [vite-plugin-vconsole](https://github.com/vadxq/vite-plugin-vconsole) - A lightweight, extendable front-end developer tool for mobile web page
|
|
|
|
+- [vite-plugin-mock-dev-server](https://github.com/pengzhanbo/vite-plugin-mock-dev-server) - Vite Plugin for API mock dev server
|
|
|
|
+- [postcss-mobile-forever](https://github.com/wswmsword/postcss-mobile-forever) - To adapt different displays by one mobile viewport
|
|
|
|
+- [vite-plugin-vue-devtools](https://github.com/vuejs/devtools-next) - Designed to enhance the Vue developer experience
|
|
|
|
+- [vueuse](https://github.com/antfu/vueuse) - collection of useful composition APIs
|
|
|
|
+- [@unhead/vue](https://github.com/unjs/unhead) - manipulate document head reactively
|
|
|
|
+- [vite-plugin-pwa](https://github.com/antfu/vite-plugin-pwa) - PWA
|
|
|
|
+- [vite-plugin-sitemap](https://github.com/jbaubree/vite-plugin-sitemap) - sitemap and robots generator
|
|
|
|
+
|
|
|
|
+### Coding Style
|
|
|
|
+
|
|
|
|
+- Use Composition API with [`<script setup>` SFC syntax](https://github.com/vuejs/rfcs/pull/227)
|
|
|
|
+- [ESLint](https://eslint.org/) with [@antfu/eslint-config](https://github.com/antfu/eslint-config), single quotes, no semi
|
|
|
|
+
|
|
|
|
+### Dev tools
|
|
|
|
+
|
|
|
|
+- [TypeScript](https://www.typescriptlang.org/)
|
|
|
|
+- [Vitest](https://github.com/vitest-dev/vitest) - Unit testing powered by Vite
|
|
|
|
+- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
|
|
|
|
+- [Netlify](https://www.netlify.com/) - zero-config deployment
|
|
|
|
+- [VS Code Extensions](./.vscode/extensions.json)
|
|
|
|
+ - [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically
|
|
|
|
+ - [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 3 `<script setup>` IDE support
|
|
|
|
+ - [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - Icon inline display and autocomplete
|
|
|
|
+ - [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - All in one i18n support
|
|
|
|
+ - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
|
|
+
|
|
|
|
+## Try it now
|
|
|
|
+
|
|
|
|
+> vue3-vant-mobile requires Node 18+
|
|
|
|
+
|
|
|
|
+### GitHub Template
|
|
|
|
+
|
|
|
|
+[Create a repo from this template on GitHub](https://github.com/easy-temps/vue3-vant-mobile/generate)
|
|
|
|
+
|
|
|
|
+### Clone to local
|
|
|
|
+
|
|
|
|
+If you prefer to do it manually with the cleaner git history
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-# 获取项目代码
|
|
|
|
-git clone https://github.com/xiangshu233/vue3-vant4-mobile.git
|
|
|
|
|
|
+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
|
|
|
|
|
|
-# 安装依赖
|
|
|
|
-cd vue3-vant4-mobile
|
|
|
|
-pnpm install
|
|
|
|
|
|
+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>
|
|
|
|
+
|
|
|
|
+```bash
|
|
pnpm dev
|
|
pnpm dev
|
|
|
|
+```
|
|
|
|
|
|
-# 打包
|
|
|
|
|
|
+### Build
|
|
|
|
+
|
|
|
|
+To build the App, run
|
|
|
|
+
|
|
|
|
+```bash
|
|
pnpm build
|
|
pnpm build
|
|
```
|
|
```
|
|
|
|
|
|
-## Git 提交规范
|
|
|
|
-
|
|
|
|
-### 提交规范
|
|
|
|
-
|
|
|
|
-参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
|
|
|
|
-
|
|
|
|
-- `feat` 增加新功能
|
|
|
|
-- `fix` 修复问题/BUG
|
|
|
|
-- `style` 代码风格相关无影响运行结果的
|
|
|
|
-- `perf` 优化/性能提升
|
|
|
|
-- `refactor` 重构
|
|
|
|
-- `revert` 撤销修改
|
|
|
|
-- `test` 测试相关
|
|
|
|
-- `docs` 文档/注释
|
|
|
|
-- `chore` 依赖更新/脚手架配置修改等
|
|
|
|
-- `workflow` 工作流改进
|
|
|
|
-- `ci` 持续集成
|
|
|
|
-- `types` 类型定义文件更改
|
|
|
|
-- `wip` 开发中
|
|
|
|
-
|
|
|
|
-### 提交校验
|
|
|
|
-
|
|
|
|
-> [!TIP]
|
|
|
|
-> 关于前端工程化 **配置构建代码检查工作流** 不了解的可以看下面这两篇文章了解下
|
|
|
|
->
|
|
|
|
-> [前端工程化配置(上) 构建代码检查工作流](https://xiangshu233.cn/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%8C%96%E9%85%8D%E7%BD%AE%EF%BC%88%E4%B8%8A%EF%BC%89%20%E6%9E%84%E5%BB%BA%E4%BB%A3%E7%A0%81%E6%A3%80%E6%9F%A5%E5%B7%A5%E4%BD%9C%E6%B5%81/)
|
|
|
|
->
|
|
|
|
-> [前端工程化配置(下) 规范仓库提交记录 commitlint + commitizen + cz-git + 配置](https://xiangshu233.cn/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%8C%96%E9%85%8D%E7%BD%AE%EF%BC%88%E4%B8%8B%EF%BC%89%20%E8%A7%84%E8%8C%83%E4%BB%93%E5%BA%93%E6%8F%90%E4%BA%A4%E8%AE%B0%E5%BD%95/)
|
|
|
|
-
|
|
|
|
-> [!IMPORTANT]
|
|
|
|
-> 首次 clone 代码 `pnpm install` 后 需要执行以下命令来更新`git hooks`
|
|
|
|
->
|
|
|
|
-> ```shell
|
|
|
|
-> # Update ./git/hooks
|
|
|
|
-> npx simple-git-hooks
|
|
|
|
-> ```
|
|
|
|
-
|
|
|
|
-本项目提交规范校验使用 [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) 作为 git hooks,使用 [cz-git](https://github.com/Zhengqbbb/cz-git) 作为 commitlint commitizen。
|
|
|
|
-
|
|
|
|
-> [!IMPORTANT]
|
|
|
|
-> 更改的代码若想要使用 Commitlint 规范提交需要将文件(放入暂存区) `git add` 后,控制台执行 `cz` 命令开启 cz-git CLI
|
|
|
|
-> 。若想直接执行 `git commit` 需要满足上面提交规范才能通过校验,否则将会被 Git Hook 打断提交
|
|
|
|
-
|
|
|
|
-simple-git-hooks 和 husky 都是用于管理 Git 钩子(Git hooks)的工具,但它们有一些区别:
|
|
|
|
-
|
|
|
|
-> simple-git-hooks:
|
|
|
|
->
|
|
|
|
-> - 简介: simple-git-hooks 是一个轻量级的工具,用于管理和运行Git钩子。
|
|
|
|
-> - 特点:
|
|
|
|
-> - 提供了简单的配置方式来定义和运行 Gi 钩子。
|
|
|
|
-> - 适合于小型项目或对 Git 钩子需求不复杂的项目。
|
|
|
|
-> - 相对较少的功能和配置选项。
|
|
|
|
-> - 使用场景: 适用于简单的项目或对 Git 钩子管理需求不高的情况。
|
|
|
|
->
|
|
|
|
-> husky:
|
|
|
|
->
|
|
|
|
-> - 简介: husky 是一个功能强大的工具,用于管理 Git 钩子,并且在项目中被广泛使用。
|
|
|
|
-> - 特点:
|
|
|
|
-> - 提供了丰富的配置选项和灵活性,可以精细地控制 Git 钩子的行为。
|
|
|
|
-> - 支持在不同的 Git 钩子事件上运行自定义脚本。
|
|
|
|
-> - 可以与其他工具(如linters、测试框架等)集成,实现更复杂的工作流。
|
|
|
|
-> - 使用场景: 适用于需要灵活配置和管理 Git 钩子的项目,尤其是大型或复杂的项目。
|
|
|
|
-
|
|
|
|
-```json
|
|
|
|
-// package.json
|
|
|
|
-{
|
|
|
|
- "simple-git-hooks": {
|
|
|
|
- // 对暂存区执行 eslint --fix
|
|
|
|
- "pre-commit": "pnpm lint-staged",
|
|
|
|
- // 对提交信息进行校验
|
|
|
|
- "commit-msg": "npx --no-install commitlint --edit $1"
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- "lint-staged": {
|
|
|
|
- "*": "eslint --fix"
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-```
|
|
|
|
|
|
+And you will see the generated file in `dist` that ready to be served.
|
|
|
|
+
|
|
|
|
+### Deploy on Netlify
|
|
|
|
+
|
|
|
|
+Go to [Netlify](https://app.netlify.com/start) and select your clone, `OK` along the way, and your App will be live in a minute.
|
|
|
|
|
|
-## 浏览器支持
|
|
|
|
|
|
+## Community
|
|
|
|
|
|
-本地开发推荐使用`Chrome 80+` 浏览器
|
|
|
|
|
|
+We recommend that [issue](https://github.com/easy-temps/vue3-vant-mobile/issues) be used for problem feedback, or Wechat group.
|
|
|
|
|
|
-支持现代浏览器, 不支持 IE
|
|
|
|
|
|
+<img style="width: 25%" src="https://cdn.jsdelivr.net/gh/easy-temps/easy-static/community.png" alt="community" />
|
|
|
|
|
|
-| [](http://godban.github.io/browsers-support-badges/) IE | [](http://godban.github.io/browsers-support-badges/) Edge | [](http://godban.github.io/browsers-support-badges/) Firefox | [](http://godban.github.io/browsers-support-badges/) Chrome | [](http://godban.github.io/browsers-support-badges/) Safari |
|
|
|
|
-| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
-| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
|
|
|
|
|
+## Donation ☕
|
|
|
|
|
|
-## 维护者
|
|
|
|
|
|
+[Buy Me a Coffee](https://github.com/CharleeWa/sponsor)
|
|
|
|
|
|
-[@xiangshu233](https://github.com/xiangshu233)
|
|
|
|
|
|
+<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>
|
|
|
|
+</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>
|
|
|
|
+</p>
|
|
|
|
|
|
-## LICENSE
|
|
|
|
|
|
+## License
|
|
|
|
|
|
-[MIT](https://en.wikipedia.org/wiki/MIT_License)
|
|
|
|
|
|
+[MIT](./LICENSE) License
|