👋👋👋 基于Vue3.4、Vite5、Vant4、Pinia、Typescript、UnoCSS等主流技术开发,集成 Dark Mode(暗黑)模式和系统主题色,且持久化保存,集成 Mock 数据,包括登录/注册/找回/keep-alive/Axios/useEcharts/IconSvg等其他扩展。你可以在此之上直接开发你的业务代码!
MIT License
Vue3 Vant4 Mobile Vue3.4``Vite5``Vant4``Pinia``TypeScript``UnoCSS
Dark Mode
Mock
// API <keep-alive>
NavBar``TabBar
Layout Axios``useECharts``IconSvg
antfu antfu/eslint-config Eslint cz-git
lint-staged``simple-git-hooks
Git
https://vvmobile.xiangshu233.cn/
admin123456
test123456
Vite
Vue3
vant4
Pinia
TypeScript
Vue-Router
Echarts
IconSvg
px
viewport
JS
CSS
UnoCSS
Mockjs
ES6
<prefix><collection>-<icon>
<prefix><collection>:<icon>
<!-- 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" />
[!WARNING]
i-xxx
icones icon namei-
20.x
^20.9.0 || >=21.7.1
IDE VS Code
.env
.vscode/settings.json
{
// 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"
]
}
#
git clone https://github.com/xiangshu233/vue3-vant4-mobile.git
#
cd vue3-vant4-mobile
pnpm install
#
pnpm dev
#
pnpm build
feat
fix
/BUGstyle
perf
/refactor
revert
test
docs
/chore
/workflow
ci
types
wip
[!TIP]
[!IMPORTANT] clone
pnpm install
git hooks
# Update ./git/hooks npx simple-git-hooks
simple-git-hooks git hooks cz-git commitlint commitizen
[!IMPORTANT]
# Global install commitizen CLI npm install -g commitizen
commitizen
Commitlintgit add
cz
cz-git CLIgit 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
// package.json
{
"simple-git-hooks": {
// eslint --fix
"pre-commit": "pnpm lint-staged",
//
"commit-msg": "npx --no-install commitlint --edit $1"
},
"lint-staged": {
"*": "eslint --fix"
}
}
Chrome 80+
, IE
IE | Edge | Firefox | Chrome | Safari |
---|---|---|---|---|
not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |