Compare commits

..

No commits in common. "master" and "v2.0.1" have entirely different histories.

58 changed files with 339 additions and 248 deletions

BIN
.DS_Store vendored

Binary file not shown.

5
.npmrc
View File

@ -1,9 +1,6 @@
# 提示:如果你想自动安装对等依赖,在项目根目录下的.npmrc文件中添加"auto-install-peers=true"。 # 提示:如果你想自动安装对等依赖,在项目根目录下的.npmrc文件中添加"auto-install-peers=true"。
# 提示:如果你不希望pnpm在对等依赖问题上失败在项目根目录下的.npmrc文件中添加"strict-peer-dependencies=false"。 # 提示:如果你不希望pnpm在对等依赖问题上失败在项目根目录下的.npmrc文件中添加"strict-peer-dependencies=false"。
auto-install-peers=true # auto-install-peers=true
strict-peer-dependencies=false strict-peer-dependencies=false
registry=https://registry.npmmirror.com registry=https://registry.npmmirror.com
# registry=https://registry.npmjs.org # registry=https://registry.npmjs.org
public-hoist-pattern[]=*vue*
shamefully-hoist=true

16
.versionrc Normal file
View File

@ -0,0 +1,16 @@
{
"types": [
{"type": "chore", "section":"'🎫 Chores | 其他更新", "hidden": false},
{"type": "revert", "section":"⏪ Reverts | 回退", "hidden": false},
{"type": "feat", "section": "✨ Features | 新功能", "hidden": false},
{"type": "fix", "section": "🐛 Bug Fixes | Bug 修复", "hidden": false},
{"type": "improvement", "section": "Feature Improvements", "hidden": false},
{"type": "docs", "section":"📝 Documentation | 文档", "hidden": false},
{"type": "style", "section":"💄 Styles | 风格", "hidden": false},
{"type": "refactor", "section":"💄 Refactor | 重构", "hidden": false},
{"type": "perf", "section":"⚡ Performance Improvements | 性能优化", "hidden": false},
{"type": "test", "section":"✅ Tests | 测试", "hidden": false},
{"type": "build", "section":"👷‍ Build System | 构建", "hidden": false},
{"type": "ci", "section":"🔧 Continuous Integration | CI 配置", "hidden":false}
]
}

View File

@ -1,10 +0,0 @@
module.exports = {
types: [
{ type: 'feat', section: '✨ Features | 新功能', hidden: false },
{ type: 'fix', section: '🐛 Bug Fixes | Bug 修复', hidden: false },
{ type: 'docs', section: '📝 Documentation | 文档', hidden: false },
{ type: 'style', section: '💄 Styles | 风格', hidden: false },
{ type: 'refactor', section: '💄 Refactor | 重构', hidden: false },
{ type: 'perf', section: '⚡ Performance Improvements | 性能优化', hidden: false },
],
};

View File

@ -2,27 +2,55 @@
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
## [2.1.0](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/compare/v2.0.1...v2.1.0) (2025-04-02)
### ✨ Features | 新功能
* add unocss configuration for styling ([642ee9e](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/642ee9e6374651d502fc47bb6596711a93af1e07))
### 🐛 Bug Fixes | Bug 修复
* **build:** 修复pnpm构建出错的问题 ([a0b559f](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/a0b559f7d2f87e738c7b61560f0c44312e985a3f))
### 💄 Styles | 风格
* 格式化代码 ([36d036e](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/36d036e08626ced71485b8566acba8a824132657))
* 格式化代码 ([bfcabd0](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/bfcabd0262fefdb2d78c294cf149ec32874846b3))
## 2.0.1 (2024-08-30) ## 2.0.1 (2024-08-30)
### '🎫 Chores | 其他更新
* **deps:** 依赖更新和registry更改 ([626781e](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/626781e26a96d02b40316d356361e2c94d400da7))
* **deps:** 升级多个依赖 ([88b669f](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/88b669fb6f2b12d731df393e2d78479c47c8fe8a))
* **deps:** 更新依赖版本,提升安全性和稳定性 ([0ceb22c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0ceb22cca9875b695d91fc357e72e833651e5c4b))
* **deps:** 更新依赖版本,提升安全性和稳定性 ([b84074d](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b84074d5a4820aa42e80b09e6ebc7cb34aa54711))
* **deps:** 更新依赖版本,提升安全性和稳定性 ([1a9d4b9](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/1a9d4b91813cea900210cc4f799abdb84047b729))
* git忽略 ([e5f330d](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e5f330d954640622960f43b996a51f54092e17ba))
* git忽略.vscode ([d152a08](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d152a08c8db7d1723c761b24393bf023251c7c44))
* **release:** 2.0.0 ([b43c7fe](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b43c7feb4dbdd4e8cee0762947681b9ae3fc347e))
* **tailwind:** update tailwind.config.js ([5c71382](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5c71382eafadb0d70b6acb0d65548cfbecb090e9))
* v1.1.0 ([b44722b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b44722b4755f8f8fb903b20523e04ad853dc283f))
* v1.1.2 ([5bae0db](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5bae0db521a8e6f81c75ba8396adda0410d911b0))
* v1.2.0 ([6fa79a3](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/6fa79a3172b7c845a48988134e0b672acbb5ec40))
* v1.2.1 ([a3c4670](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/a3c4670487c054c56fd2105b803308afe352b9fa))
* v1.3.0 ([ac0adea](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/ac0adea64a83d0fe17808cfddf2089838cc4cf3b))
* v1.3.1 ([9a50a8a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/9a50a8a518e3992227fe8f3f4295e114ef562a66))
* 优化配置 ([5ddc086](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5ddc086f96c56c675e498961e81c5988704da23c))
* 更新 uni-mini-router 修复前置导航守卫无法指向跳转类型不同的页面的问题 ([bee039b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/bee039b624a1338b2db6c1db8e3ae7627c50a69c))
* 更新 uni-mini-router 修复未配置导航守卫时无法跳转的问题 ([b13d993](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b13d9935a3ce4394868a80d09f0dfafa14927bf0))
* 更新 uniapp 到 3.6.17 20230111001 ([cbec132](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cbec1323b9cb763bc4b57d7e608ac3414e5aee95))
* 更新依赖 ([776d99a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/776d99a69b39581b308066781fe72395584aa22d))
* 更新依赖 ([4bd19e6](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4bd19e674b7df7aed873ebdb1a0a72641b6469d1))
* 更新依赖 ([fa112f8](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/fa112f88b9ecc22acdb27a9c89af4ea05da01775))
* 更新依赖 ([e0d9972](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e0d997237da34de0bddbfdb8a227c017f74488c0))
* 更新依赖 ([4d542ec](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4d542ecd59dd6a7d393b06c012fbc2d368a2968f))
* 更新依赖 ([9fdd969](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/9fdd96921357ba85eb6cca7a49d623d53b94c32b))
* 更新依赖 ([0307f7f](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0307f7fdca809a88fd0f7006f860535ae5821641))
* 更新依赖 ([c93b7b1](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/c93b7b1df0bfa15721b3786931693d68d7ea8f1c))
* 更新依赖 ([9837129](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/983712947194e57fe7decf631e5d08be751e81b2))
* 更新依赖 ([a9721bf](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/a9721bfdaf119f206626be39d8203d5eab68c69c))
* 更新依赖 ([43b8920](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/43b8920e741a1c59108c3b0fdcd1931ff9473e07))
* 更新依赖 ([10df991](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/10df991487b67556a2d6a71d78064001a2bcddd7))
* 更新依赖 ([6f0e877](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/6f0e8778f341bcbce3f72f45a2f11558e97dcfd1))
* 更新依赖 ([be1c341](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/be1c3414415beb2b1ecbd5aab213fe3b2564695c))
* 更新依赖 ([5710ae1](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5710ae16ee3b0f5746533e19e0096bebca190d1d))
* 更新依赖 ([347d023](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/347d0233c4f1049362fc161af701165af605ea6d))
* 更新依赖 ([dd506ce](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/dd506ce576002edee417ae44064392202b34f791))
* 更新依赖 ([3ba0463](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/3ba04639505817b2326284cfbc462a70cd12077d))
* 更新依赖 ([3299533](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/3299533e3123694d8db3e71cba3f8dae681da1bc))
* 更新依赖 ([8a4cd75](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/8a4cd75b4f8cd69a79f880b072c758b817a92bcc))
* 更新依赖 ([28a7ec0](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/28a7ec0dc2b5e0190a942a0e3e2e84c42902c4ae))
* 更新部分依赖 ([cd96923](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cd96923d779d336d59f47369772b2ec93b072b6f))
* 移除未用依赖-qs ([16e230b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/16e230baadaaee46ad2aba47270b0092ab431e96))
### ✨ Features | 新功能 ### ✨ Features | 新功能
* Added utility function - judgePlatform ([e28a64a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e28a64a6939583695722a6dffcd22660625c1069)) * Added utility function - judgePlatform ([e28a64a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e28a64a6939583695722a6dffcd22660625c1069))
@ -75,6 +103,29 @@ All notable changes to this project will be documented in this file. See [commit
* 解决无模块 'uview-plus' 问题,并扩展 uni.$u 类型支持 ([0a0f4ce](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0a0f4cea13fa83e217a79adc7f34dda620da7662)) * 解决无模块 'uview-plus' 问题,并扩展 uni.$u 类型支持 ([0a0f4ce](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0a0f4cea13fa83e217a79adc7f34dda620da7662))
### 📝 Documentation | 文档
* **readme:** 删除冗余的评论标记 ([20c40d2](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/20c40d2ec9a16db6037137e7ff731a17d85d8161))
* **readme:** 更新 ([63a4d2e](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/63a4d2ea878367ca104eae48c94ecff7a72edd8e))
* **readme:** 更新 ([a7a7c6e](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/a7a7c6e2da48dc8d3becd3031d054e4ffdb5d758))
* **readme:** 更新徽标和环境配置说明 ([d734c04](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d734c0409fe2e4c2861db416797298779fd13b50))
* update README.md ([eb285ef](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/eb285ef5358e7b53728a33bb11d46584572dfb26))
* update README.md ([00d3ac1](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/00d3ac139d3f42d086f36806961e67e92d418ceb))
* update README.md ([cbdea39](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cbdea39dad48341a6572cd460777c264e56b2c3d))
* update README.md ([98afa46](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/98afa46b592cbd1618aecfe0dad418bb249def7a))
* update README.md ([c39c893](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/c39c89371ed14dc683f10d4d9bed7f91f3e9f79c))
* update README.md ([2116e71](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/2116e71e4b06d958e22a992f4eb6c4e4c3fb3418))
* update README.md ([71dc6a3](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/71dc6a33741474cade8466f7b834eefcb2cccb32))
* update README.md ([e8c56cf](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e8c56cf06d78c76ef0203fffd07547cd556194c4))
* update README.md ([4ca0e9d](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4ca0e9d1fe74cb2007dacca5efc463afda2852f6))
* update README.md ([917f1bb](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/917f1bb45220bd53dfe5bf42cc9cd6b952e3b403))
* update README.md ([8fe8fa0](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/8fe8fa0b95cb369830a59be0edd26a92d8550a58))
* update README.md ([e970b54](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e970b547182539ffcb3036baa4372720b9bae817))
* update README.md ([d8bb344](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d8bb34420b0ca363c4b5cba2f631863f21f4a9c6))
* update README.md. ([cd2da6a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cd2da6a4bf2adba0514623ffdd5aba88a884133a))
* 小程序体验码 ([19dde05](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/19dde05e04498cea60e1274b86dc2f817e30f392))
### 💄 Styles | 风格 ### 💄 Styles | 风格
* eslint 格式化代码 ([0fea321](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0fea321256c3dd082d490c340d3e81d6e745ceca)) * eslint 格式化代码 ([0fea321](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0fea321256c3dd082d490c340d3e81d6e745ceca))
@ -109,9 +160,65 @@ All notable changes to this project will be documented in this file. See [commit
* 路由优化 ([cd50917](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cd50917754c29ccac5ed95edee629c732c534d5f)) * 路由优化 ([cd50917](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cd50917754c29ccac5ed95edee629c732c534d5f))
### ✅ Tests | 测试
* 哈哈哈 ([5d279c7](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5d279c717329fc3c16c45d532babbb52dbf6ae3e))
### 🔧 Continuous Integration | CI 配置
* 一些配置和注释 ([6dade26](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/6dade26acb160d0c3febc830c56d9a3e2e1fdc7e))
* 一些配置和注释 ([497270c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/497270cf5e7174d7d893b93b25df9d281b0a6b09))
* 一些配置和注释 ([4f1b0df](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4f1b0df492fb3c65d505f96a6aa34d7fe9d53296))
* 修改文件并lint ([d5848bd](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d5848bdb762ebecb31ea4b4cca1baad73bdba34d))
* 持续集成 ([8366605](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/836660506861209037f7ce2507ed9c8290d0a80f))
## 2.0.0 (2024-08-20) ## 2.0.0 (2024-08-20)
### '🎫 Chores | 其他更新
* 更新 uni-mini-router 修复前置导航守卫无法指向跳转类型不同的页面的问题 ([bee039b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/bee039b624a1338b2db6c1db8e3ae7627c50a69c))
* 更新 uni-mini-router 修复未配置导航守卫时无法跳转的问题 ([b13d993](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b13d9935a3ce4394868a80d09f0dfafa14927bf0))
* 更新 uniapp 到 3.6.17 20230111001 ([cbec132](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cbec1323b9cb763bc4b57d7e608ac3414e5aee95))
* 更新部分依赖 ([cd96923](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cd96923d779d336d59f47369772b2ec93b072b6f))
* 更新依赖 ([776d99a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/776d99a69b39581b308066781fe72395584aa22d))
* 更新依赖 ([4bd19e6](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4bd19e674b7df7aed873ebdb1a0a72641b6469d1))
* 更新依赖 ([fa112f8](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/fa112f88b9ecc22acdb27a9c89af4ea05da01775))
* 更新依赖 ([e0d9972](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e0d997237da34de0bddbfdb8a227c017f74488c0))
* 更新依赖 ([4d542ec](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4d542ecd59dd6a7d393b06c012fbc2d368a2968f))
* 更新依赖 ([9fdd969](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/9fdd96921357ba85eb6cca7a49d623d53b94c32b))
* 更新依赖 ([0307f7f](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0307f7fdca809a88fd0f7006f860535ae5821641))
* 更新依赖 ([c93b7b1](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/c93b7b1df0bfa15721b3786931693d68d7ea8f1c))
* 更新依赖 ([9837129](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/983712947194e57fe7decf631e5d08be751e81b2))
* 更新依赖 ([a9721bf](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/a9721bfdaf119f206626be39d8203d5eab68c69c))
* 更新依赖 ([43b8920](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/43b8920e741a1c59108c3b0fdcd1931ff9473e07))
* 更新依赖 ([10df991](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/10df991487b67556a2d6a71d78064001a2bcddd7))
* 更新依赖 ([6f0e877](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/6f0e8778f341bcbce3f72f45a2f11558e97dcfd1))
* 更新依赖 ([be1c341](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/be1c3414415beb2b1ecbd5aab213fe3b2564695c))
* 更新依赖 ([5710ae1](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5710ae16ee3b0f5746533e19e0096bebca190d1d))
* 更新依赖 ([347d023](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/347d0233c4f1049362fc161af701165af605ea6d))
* 更新依赖 ([dd506ce](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/dd506ce576002edee417ae44064392202b34f791))
* 更新依赖 ([3ba0463](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/3ba04639505817b2326284cfbc462a70cd12077d))
* 更新依赖 ([3299533](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/3299533e3123694d8db3e71cba3f8dae681da1bc))
* 更新依赖 ([8a4cd75](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/8a4cd75b4f8cd69a79f880b072c758b817a92bcc))
* 更新依赖 ([28a7ec0](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/28a7ec0dc2b5e0190a942a0e3e2e84c42902c4ae))
* 移除未用依赖-qs ([16e230b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/16e230baadaaee46ad2aba47270b0092ab431e96))
* 优化配置 ([5ddc086](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5ddc086f96c56c675e498961e81c5988704da23c))
* **deps:** 更新依赖版本,提升安全性和稳定性 ([0ceb22c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/0ceb22cca9875b695d91fc357e72e833651e5c4b))
* **deps:** 更新依赖版本,提升安全性和稳定性 ([b84074d](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b84074d5a4820aa42e80b09e6ebc7cb34aa54711))
* **deps:** 更新依赖版本,提升安全性和稳定性 ([1a9d4b9](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/1a9d4b91813cea900210cc4f799abdb84047b729))
* **deps:** 依赖更新和registry更改 ([626781e](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/626781e26a96d02b40316d356361e2c94d400da7))
* git忽略 ([e5f330d](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e5f330d954640622960f43b996a51f54092e17ba))
* git忽略.vscode ([d152a08](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d152a08c8db7d1723c761b24393bf023251c7c44))
* v1.1.0 ([b44722b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/b44722b4755f8f8fb903b20523e04ad853dc283f))
* v1.1.2 ([5bae0db](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5bae0db521a8e6f81c75ba8396adda0410d911b0))
* v1.2.0 ([6fa79a3](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/6fa79a3172b7c845a48988134e0b672acbb5ec40))
* v1.2.1 ([a3c4670](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/a3c4670487c054c56fd2105b803308afe352b9fa))
* v1.3.0 ([ac0adea](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/ac0adea64a83d0fe17808cfddf2089838cc4cf3b))
* v1.3.1 ([9a50a8a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/9a50a8a518e3992227fe8f3f4295e114ef562a66))
### ✨ Features | 新功能 ### ✨ Features | 新功能
* 当前platform(平台) ([3a83e5b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/3a83e5b4fbcc9a4eb566873ce0bd7b9e27f7b530)) * 当前platform(平台) ([3a83e5b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/3a83e5b4fbcc9a4eb566873ce0bd7b9e27f7b530))
@ -162,6 +269,26 @@ All notable changes to this project will be documented in this file. See [commit
* 移动 env.d.ts 到 types 目录 ([03bc0d8](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/03bc0d8b22523221101397121f5bc9f7f9017545)) * 移动 env.d.ts 到 types 目录 ([03bc0d8](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/03bc0d8b22523221101397121f5bc9f7f9017545))
### 📝 Documentation | 文档
* 小程序体验码 ([19dde05](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/19dde05e04498cea60e1274b86dc2f817e30f392))
* **readme:** 更新徽标和环境配置说明 ([d734c04](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d734c0409fe2e4c2861db416797298779fd13b50))
* update README.md ([eb285ef](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/eb285ef5358e7b53728a33bb11d46584572dfb26))
* update README.md ([00d3ac1](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/00d3ac139d3f42d086f36806961e67e92d418ceb))
* update README.md ([cbdea39](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cbdea39dad48341a6572cd460777c264e56b2c3d))
* update README.md ([98afa46](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/98afa46b592cbd1618aecfe0dad418bb249def7a))
* update README.md ([c39c893](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/c39c89371ed14dc683f10d4d9bed7f91f3e9f79c))
* update README.md ([2116e71](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/2116e71e4b06d958e22a992f4eb6c4e4c3fb3418))
* update README.md ([71dc6a3](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/71dc6a33741474cade8466f7b834eefcb2cccb32))
* update README.md ([e8c56cf](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e8c56cf06d78c76ef0203fffd07547cd556194c4))
* update README.md ([4ca0e9d](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4ca0e9d1fe74cb2007dacca5efc463afda2852f6))
* update README.md ([917f1bb](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/917f1bb45220bd53dfe5bf42cc9cd6b952e3b403))
* update README.md ([8fe8fa0](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/8fe8fa0b95cb369830a59be0edd26a92d8550a58))
* update README.md ([e970b54](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/e970b547182539ffcb3036baa4372720b9bae817))
* update README.md ([d8bb344](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d8bb34420b0ca363c4b5cba2f631863f21f4a9c6))
* update README.md. ([cd2da6a](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/cd2da6a4bf2adba0514623ffdd5aba88a884133a))
### 💄 Styles | 风格 ### 💄 Styles | 风格
* 格式化 ([002325b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/002325bfbb5a24eb9cc94364c748451fe1aaff60)) * 格式化 ([002325b](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/002325bfbb5a24eb9cc94364c748451fe1aaff60))
@ -194,3 +321,17 @@ All notable changes to this project will be documented in this file. See [commit
* 优化登录体验 ([d64ee1c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d64ee1cb80d8e358c0a54904b6819ec86f832b69)) * 优化登录体验 ([d64ee1c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d64ee1cb80d8e358c0a54904b6819ec86f832b69))
* 注释logout api 的调用 ([7bc5b4c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/7bc5b4ccbaae3316522cf083fb3ea4cea4718064)) * 注释logout api 的调用 ([7bc5b4c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/7bc5b4ccbaae3316522cf083fb3ea4cea4718064))
* httpRequest 优化 ([d6b7132](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d6b71321b560570cb493799cc38ede98cbf958fe)) * httpRequest 优化 ([d6b7132](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d6b71321b560570cb493799cc38ede98cbf958fe))
### ✅ Tests | 测试
* 哈哈哈 ([5d279c7](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/5d279c717329fc3c16c45d532babbb52dbf6ae3e))
### 🔧 Continuous Integration | CI 配置
* 持续集成 ([8366605](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/836660506861209037f7ce2507ed9c8290d0a80f))
* 修改文件并lint ([d5848bd](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/d5848bdb762ebecb31ea4b4cca1baad73bdba34d))
* 一些配置和注释 ([6dade26](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/6dade26acb160d0c3febc830c56d9a3e2e1fdc7e))
* 一些配置和注释 ([497270c](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/497270cf5e7174d7d893b93b25df9d281b0a6b09))
* 一些配置和注释 ([4f1b0df](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template/commit/4f1b0df492fb3c65d505f96a6aa34d7fe9d53296))

View File

@ -17,7 +17,7 @@
<img src="https://img.shields.io/badge/-pnpm-F69220?logo=pnpm&logoColor=white" /> <img src="https://img.shields.io/badge/-pnpm-F69220?logo=pnpm&logoColor=white" />
</a> </a>
<a href="https://unocss.dev/" target="_blank"> <a href="https://unocss.dev/" target="_blank">
<img src="https://img.shields.io/badge/-unocss-0f172a?logo=unocss" /> <img src="https://img.shields.io/badge/-tailwindcss-0f172a?logo=tailwindcss" />
</a> </a>
<a href="https://iconify.design/" target="_blank"> <a href="https://iconify.design/" target="_blank">
<img src="https://img.shields.io/badge/-Iconify-1769aa?logo=Iconify" /> <img src="https://img.shields.io/badge/-Iconify-1769aa?logo=Iconify" />
@ -55,7 +55,7 @@
## 特性 ## 特性
- **最新技术栈**:使用 Vue3/Vite5/pinia ,TypeScript 等前端前沿技术开发; - **最新技术栈**:使用 Vue3/Vite5/pinia ,TypeScript 等前端前沿技术开发;
- **[Unocss](https://unocss.dev/)**: 原子化 CSS, [iconify](https://iconify.design/)图标 - **[Tailwindcss](https://tailwindcss.com/)**: 原子化 CSS, [iconify](https://iconify.design/)图标
- **Eslint**: 规范代码格式,统一编码; - **Eslint**: 规范代码格式,统一编码;
- **路由拦截**: [uni-mini-router](https://gitee.com/fant-mini/uni-mini-router),类似Vue Router的API和功能,在uni-app中进行路由跳转、传参、拦截等常用操作; - **路由拦截**: [uni-mini-router](https://gitee.com/fant-mini/uni-mini-router),类似Vue Router的API和功能,在uni-app中进行路由跳转、传参、拦截等常用操作;
- **请求拦截**: 使用[alova 请求](https://github.com/alovajs/alova),支持请求和响应拦截等; - **请求拦截**: 使用[alova 请求](https://github.com/alovajs/alova),支持请求和响应拦截等;
@ -132,7 +132,7 @@
├─ package.json ├─ package.json
├─ pnpm-lock.yaml ├─ pnpm-lock.yaml
├─ README.md ├─ README.md
├─ unocss.config.ts ├─ tailwind.config.js
├─ tsconfig.json ├─ tsconfig.json
└─ vite.config.ts └─ vite.config.ts
@ -152,7 +152,7 @@
- 安装依赖 - 安装依赖
> 若 pnpm 安装或运行失败,请使用 npm 或 **yarn** 安装依赖 > 若 pnpm 安装或运行失败,请使用 npm 或 yarn 安装依赖
```bash ```bash
pnpm install pnpm install

View File

@ -3,13 +3,13 @@ import process from 'node:process';
const currentPlatform = process.env.UNI_PLATFORM; const currentPlatform = process.env.UNI_PLATFORM;
const isH5 = currentPlatform === 'h5'; const isH5 = currentPlatform === 'h5';
const isApp = currentPlatform === 'app'; const isApp = currentPlatform === 'app';
const WeappTailwindcssDisabled = isH5 || isApp;
const isMp = !isH5 && !isApp; const isMp = !isH5 && !isApp;
const isWeixinMp = currentPlatform === 'mp-weixin';
export { export {
currentPlatform,
isApp,
isH5, isH5,
isApp,
WeappTailwindcssDisabled,
isMp, isMp,
isWeixinMp, currentPlatform,
}; };

View File

@ -1,5 +1,3 @@
import type { ProxyOptions } from 'vite';
/** /**
* Configure according to the proxy list * Configure according to the proxy list
* @param proxyList * @param proxyList

View File

@ -1,10 +1,10 @@
import type { PluginOption } from 'vite'; import type { PluginOption } from 'vite';
import uni from '@dcloudio/vite-plugin-uni'; import uni from '@dcloudio/vite-plugin-uni';
import { visualizer } from 'rollup-plugin-visualizer'; import { UnifiedViteWeappTailwindcssPlugin as uvtw } from 'weapp-tailwindcss/vite';
import Unocss from 'unocss/vite';
import autoImport from 'unplugin-auto-import/vite'; import autoImport from 'unplugin-auto-import/vite';
import viteRestart from 'vite-plugin-restart'; import viteRestart from 'vite-plugin-restart';
import { isH5 } from './platform'; import { visualizer } from 'rollup-plugin-visualizer';
import { WeappTailwindcssDisabled, isH5 } from './platform';
interface VitePluginConfig { interface VitePluginConfig {
isProd: boolean isProd: boolean
@ -14,8 +14,12 @@ export function createVitePlugins({ isProd }: VitePluginConfig): PluginOption[]
return [ return [
// @ts-expect-error TODO uni() 会报错uni is not a function,暂时使用此方式解决 // @ts-expect-error TODO uni() 会报错uni is not a function,暂时使用此方式解决
uni?.default(), uni?.default(),
Unocss({ uvtw({
hmrTopLevelAwait: false, rem2rpx: true,
disabled: WeappTailwindcssDisabled,
// 使用新的 ast-grep 来处理 js 资源,速度是 babel 的2倍左右
// 需要先安装 `@ast-grep/napi`
// jsAstTool: 'ast-grep'
}), }),
autoImport({ autoImport({
include: [ include: [

View File

@ -1,7 +1,7 @@
{ {
"name": "uniapp_vue3_vite_ts", "name": "uniapp_vue3_vite_ts",
"type": "module", "type": "module",
"version": "2.1.0", "version": "2.0.1",
"scripts": { "scripts": {
"dev:app": "uni -p app", "dev:app": "uni -p app",
"dev:custom": "uni -p", "dev:custom": "uni -p",
@ -33,6 +33,7 @@
"build:quickapp-webview-union": "uni build -p quickapp-webview-union", "build:quickapp-webview-union": "uni build -p quickapp-webview-union",
"lint:fix": "eslint . --fix", "lint:fix": "eslint . --fix",
"git:hooks": "npx simple-git-hooks", "git:hooks": "npx simple-git-hooks",
"postinstall": "weapp-tw patch",
"version:first": "commit-and-tag-version --first-release", "version:first": "commit-and-tag-version --first-release",
"version:alpha": "commit-and-tag-version --prerelease alpha", "version:alpha": "commit-and-tag-version --prerelease alpha",
"version:beta": "commit-and-tag-version --prerelease beta", "version:beta": "commit-and-tag-version --prerelease beta",
@ -42,63 +43,62 @@
"version:major": "commit-and-tag-version --release-as major" "version:major": "commit-and-tag-version --release-as major"
}, },
"dependencies": { "dependencies": {
"@alova/adapter-uniapp": "^2.0.11", "@alova/adapter-uniapp": "^2.0.4",
"@alova/mock": "^2.0.13", "@alova/mock": "^2.0.4",
"@alova/shared": "^1.1.2", "@dcloudio/uni-app": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-app": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-app-plus": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-app-plus": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-components": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-components": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-h5": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-h5": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-i18n": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-i18n": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-alipay": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-baidu": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-lark": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-qq": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-mp-weixin": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4060120250328001",
"@multiavatar/multiavatar": "^1.0.7", "@multiavatar/multiavatar": "^1.0.7",
"alova": "^3.2.10", "alova": "^3.0.11",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"pinia": "^2.3.1", "pinia": "^2.2.2",
"vue": "^3.5.13" "vue": "^3.4.38"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^4.11.0", "@antfu/eslint-config": "^2.27.1",
"@dcloudio/types": "^3.4.14", "@dcloudio/types": "^3.4.12",
"@dcloudio/uni-automator": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-automator": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-cli-shared": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-4060120250328001", "@dcloudio/uni-stacktracey": "3.0.0-alpha-4020620240822002",
"@dcloudio/uni-uts-v1": "3.0.0-alpha-4060120250328001", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020620240822002",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-4060120250328001", "@egoist/tailwindcss-icons": "^1.8.1",
"@iconify/json": "^2.2.323", "@iconify/json": "^2.2.239",
"@rollup/plugin-node-resolve": "^16.0.1",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^22.13.17", "@types/node": "^20.16.1",
"@vitejs/plugin-vue": "^5.2.3", "@vitejs/plugin-vue": "^5.1.2",
"@vue/runtime-core": "^3.5.13", "@vue/runtime-core": "^3.4.38",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.20",
"commit-and-tag-version": "^12.5.0", "commit-and-tag-version": "^12.4.1",
"eslint": "^9.23.0", "eslint": "^9.9.0",
"eslint-plugin-format": "^1.0.1", "eslint-plugin-format": "^0.1.2",
"globals": "^16.0.0", "globals": "^15.9.0",
"lint-staged": "^15.5.0", "lint-staged": "^15.2.9",
"picocolors": "^1.1.1", "picocolors": "^1.0.1",
"rollup-plugin-visualizer": "^5.14.0", "postcss": "^8.4.41",
"sass": "^1.86.1", "rollup-plugin-visualizer": "^5.12.0",
"simple-git-hooks": "^2.12.1", "sass": "^1.77.8",
"tsx": "^4.19.3", "simple-git-hooks": "^2.11.1",
"typescript": "^5.8.2", "tailwindcss": "^3.4.10",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
"uni-mini-router": "^0.1.6", "uni-mini-router": "^0.1.6",
"uni-read-pages-vite": "^0.0.6", "uni-read-pages-vite": "^0.0.6",
"unocss": "66.1.0-beta.8", "unplugin-auto-import": "^0.18.2",
"unocss-preset-weapp": "^66.0.0", "vite": "^5.4.2",
"unplugin-auto-import": "^19.1.2", "vite-plugin-restart": "^0.4.1",
"vite": "^5.4.16", "weapp-tailwindcss": "^3.5.0"
"vite-plugin-restart": "^0.4.2"
}, },
"simple-git-hooks": { "simple-git-hooks": {
"pre-commit": "npx lint-staged", "pre-commit": "npx lint-staged",

12
postcss.config.ts Normal file
View File

@ -0,0 +1,12 @@
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import type { AcceptedPlugin } from 'postcss';
import cssMacro from 'weapp-tailwindcss/css-macro/postcss';
const plugins: AcceptedPlugin[] = [tailwindcss(), autoprefixer()];
// 可以使用 postcss-pxtransform 来进行 px 转 rpx 的功能
plugins.push(cssMacro);
export default plugins;

BIN
src/.DS_Store vendored

Binary file not shown.

View File

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { useUserStore } from '@/stores/modules/user';
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'; import { onHide, onLaunch, onShow } from '@dcloudio/uni-app';
import { useUserStore } from '@/stores/modules/user';
onLaunch(() => { onLaunch(() => {
console.log('App Launch'); console.log('App Launch');
@ -15,5 +15,8 @@ onHide(() => {
}); });
</script> </script>
<style> <style lang="scss">
@import 'tailwindcss/base';
@import 'tailwindcss/utilities';
@import 'tailwindcss/components';
</style> </style>

Binary file not shown.

View File

@ -2,8 +2,6 @@ import { createSSRApp } from 'vue';
import App from './App.vue'; import App from './App.vue';
import { setupRouter } from './router'; import { setupRouter } from './router';
import { setupStore } from './stores'; import { setupStore } from './stores';
import './styles/main.css';
import 'uno.css';
export function createApp() { export function createApp() {
const app = createSSRApp(App); const app = createSSRApp(App);

View File

@ -54,38 +54,6 @@
}, },
"splashscreen": { "splashscreen": {
"useOriginalMsgbox": true "useOriginalMsgbox": true
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
} }
} }
}, },

View File

@ -1,6 +1,6 @@
import { mockGroupV1 } from '@/mock/v1';
import { uniappMockResponse, uniappRequestAdapter } from '@alova/adapter-uniapp';
import { createAlovaMockAdapter } from '@alova/mock'; import { createAlovaMockAdapter } from '@alova/mock';
import { uniappMockResponse, uniappRequestAdapter } from '@alova/adapter-uniapp';
import { mockGroupV1 } from '@/mock/v1';
/** /**
* *

View File

@ -1,5 +1,5 @@
import type { API } from '@/services/model/baseModel';
import { ResultEnum } from '@/enums/httpEnum'; import { ResultEnum } from '@/enums/httpEnum';
import type { API } from '@/services/model/baseModel';
interface MockResponseOptions<T = any> { interface MockResponseOptions<T = any> {
status: number status: number

View File

@ -1,9 +1,9 @@
import { ResultEnum } from '@/enums/httpEnum';
import { createMock } from '@/mock/utils';
import { getRandomChsString } from '@/utils/character';
import { defineMock } from '@alova/mock'; import { defineMock } from '@alova/mock';
import multiavatar from '@multiavatar/multiavatar';
import { join, random, sampleSize } from 'lodash-es'; import { join, random, sampleSize } from 'lodash-es';
import multiavatar from '@multiavatar/multiavatar';
import { createMock } from '@/mock/utils';
import { ResultEnum } from '@/enums/httpEnum';
import { getRandomChsString } from '@/utils/character';
function createRandomToken(len = 36 * 6) { function createRandomToken(len = 36 * 6) {
const token = join(sampleSize('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-', len), ''); const token = join(sampleSize('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-', len), '');

BIN
src/pages/.DS_Store vendored

Binary file not shown.

View File

@ -9,12 +9,10 @@ const appTitle = 'uniapp-vue3';
<template> <template>
<view class="flex flex-col items-center gap-y-2 pt-36"> <view class="flex flex-col items-center gap-y-2 pt-36">
<image :src="logo" class="h-8 w-8" alt="" mode="widthFix" /> <image :src="logo" class="h-8 w-8" alt="" mode="widthFix" />
<view class="text-xl font-semibold text-red"> <view class="text-xl font-semibold">
{{ appTitle }} {{ appTitle }}
</view> </view>
<view class="text-red"> <view>当前平台{{ platform }}</view>
当前平台{{ platform }}
</view>
</view> </view>
</template> </template>

View File

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { omit } from 'lodash-es';
import { useUserStore } from '@/stores/modules/user'; import { useUserStore } from '@/stores/modules/user';
import { Toast } from '@/utils/uniapi/prompt'; import { Toast } from '@/utils/uniapi/prompt';
import { omit } from 'lodash-es';
const pageQuery = ref<Record<string, any> | undefined>(undefined); const pageQuery = ref<Record<string, any> | undefined>(undefined);
onLoad((query) => { onLoad((query) => {
@ -25,7 +25,7 @@ function submit(e: any) {
const params = omit(unref(pageQuery), ['redirect', 'tabBar']); const params = omit(unref(pageQuery), ['redirect', 'tabBar']);
if (unref(pageQuery)) { if (unref(pageQuery)) {
// replacetabbarreplaceAll // replacetabbarreplaceAll
// eslint-disable-next-line ts/no-unused-expressions
unref(pageQuery)?.tabBar === 'true' unref(pageQuery)?.tabBar === 'true'
? router.replaceAll({ name: unref(pageQuery)?.redirect, params }) ? router.replaceAll({ name: unref(pageQuery)?.redirect, params })
: router.replace({ name: unref(pageQuery)?.redirect, params }); : router.replace({ name: unref(pageQuery)?.redirect, params });

View File

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import BasicButton from '@/components/BasicButton/index.vue';
import { onLoad } from '@dcloudio/uni-app'; import { onLoad } from '@dcloudio/uni-app';
import BasicButton from '@/components/BasicButton/index.vue';
const go = ref<string>(''); const go = ref<string>('');
const router = useRouter(); const router = useRouter();

View File

@ -1,9 +1,9 @@
import type { App } from 'vue';
/** /**
* router * router
* @see https://gitee.com/fant-mini/uni-mini-router * @see https://gitee.com/fant-mini/uni-mini-router
*/ */
import { createRouter } from 'uni-mini-router'; import { createRouter } from 'uni-mini-router';
import type { App } from 'vue';
import { createRouterGuard } from './guard'; import { createRouterGuard } from './guard';
const router = createRouter({ const router = createRouter({

BIN
src/services/.DS_Store vendored

Binary file not shown.

View File

@ -1,5 +1,5 @@
import type { UserInfoModel } from '@/services/model/userModel';
import { request } from '@/utils/http'; import { request } from '@/utils/http';
import type { UserInfoModel } from '@/services/model/userModel';
enum Api { enum Api {
GET_USER_INFO = '/users', GET_USER_INFO = '/users',

BIN
src/static/.DS_Store vendored

Binary file not shown.

View File

@ -1,10 +1,11 @@
// import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
interface AppState { interface AppState {
sys?: string | number sys?: string | number
} }
export const useAppStore = defineStore('app-store', { export const useAppStore = defineStore({
id: 'app-store',
state: (): AppState => ({}), state: (): AppState => ({}),
getters: {}, getters: {},
actions: {}, actions: {},

View File

@ -1,20 +1,20 @@
import type { UserInfoModel } from '@/services/model/userModel'; import { defineStore } from 'pinia';
import { TOKEN_KEY } from '@/enums/cacheEnum';
import { login as loginApi } from '@/services/api/auth';
import { getUserInfoApi } from '@/services/api/user'; import { getUserInfoApi } from '@/services/api/user';
import type { UserInfoModel } from '@/services/model/userModel';
import { login as loginApi } from '@/services/api/auth';
import { getToken, isLogin, setToken } from '@/utils/auth'; import { getToken, isLogin, setToken } from '@/utils/auth';
import { removeCache } from '@/utils/cache'; import { removeCache } from '@/utils/cache';
import { defineStore } from 'pinia'; import { TOKEN_KEY } from '@/enums/cacheEnum';
export const useUserStore = defineStore('UserStore', () => { export const useUserStore = defineStore('UserStore', () => {
const token = ref<string | null>(null); const token = ref<string | null>(null);
const userInfo = ref<UserInfoModel | null>(null); const userInfo = ref<UserInfoModel | null>(null);
// 初始化 // 初始化
async function initUserInfo() { function initUserInfo() {
if (isLogin()) { if (isLogin()) {
token.value = getToken(); token.value = getToken();
await getUserInfo(); getUserInfo();
} }
} }
@ -35,7 +35,7 @@ export const useUserStore = defineStore('UserStore', () => {
} }
// 获取用户信息 // 获取用户信息
const { send: _getUserInfo } = useRequest(getUserInfoApi, { immediate: false }); const { send: _getUserInfo } = useRequest(getUserInfoApi, { initialData: null, immediate: false });
async function getUserInfo() { async function getUserInfo() {
try { try {
userInfo.value = await _getUserInfo(); userInfo.value = await _getUserInfo();

BIN
src/utils/.DS_Store vendored

Binary file not shown.

View File

@ -1,5 +1,5 @@
import { TOKEN_KEY } from '@/enums/cacheEnum';
import { getCache, setCache } from '@/utils/cache'; import { getCache, setCache } from '@/utils/cache';
import { TOKEN_KEY } from '@/enums/cacheEnum';
const authenticationScheme = 'Bearer'; const authenticationScheme = 'Bearer';

View File

@ -1,6 +1,6 @@
import type { CreateStorageParams } from './storageCache'; import type { CreateStorageParams } from './storageCache';
import { cacheCipher, DEFAULT_CACHE_TIME, DEFAULT_PREFIX_KEY, enableStorageEncryption } from '@/settings/encryptionSetting';
import { createStorage } from './storageCache'; import { createStorage } from './storageCache';
import { DEFAULT_CACHE_TIME, DEFAULT_PREFIX_KEY, cacheCipher, enableStorageEncryption } from '@/settings/encryptionSetting';
const options: Partial<CreateStorageParams> = { const options: Partial<CreateStorageParams> = {
prefixKey: DEFAULT_PREFIX_KEY, prefixKey: DEFAULT_PREFIX_KEY,

View File

@ -1,5 +1,5 @@
import type { EncryptionParams } from '@/utils/cipher';
import { cacheCipher } from '@/settings/encryptionSetting'; import { cacheCipher } from '@/settings/encryptionSetting';
import type { EncryptionParams } from '@/utils/cipher';
import { AesEncryption } from '@/utils/cipher'; import { AesEncryption } from '@/utils/cipher';
import { isNullOrUnDef } from '@/utils/is'; import { isNullOrUnDef } from '@/utils/is';

View File

@ -1,5 +1,5 @@
import multiavatar from '@multiavatar/multiavatar';
import { random } from 'lodash-es'; import { random } from 'lodash-es';
import multiavatar from '@multiavatar/multiavatar';
const CHS_RANGE_START = 0x4E00; // 简体中文编码范围开始 const CHS_RANGE_START = 0x4E00; // 简体中文编码范围开始
const CHS_RANGE_END = 0x9FA5; // 简体中文编码范围结束 const CHS_RANGE_END = 0x9FA5; // 简体中文编码范围结束

View File

@ -1,10 +1,10 @@
import { decrypt, encrypt } from 'crypto-js/aes'; import { decrypt, encrypt } from 'crypto-js/aes';
import Base64 from 'crypto-js/enc-base64';
import UTF8, { parse } from 'crypto-js/enc-utf8'; import UTF8, { parse } from 'crypto-js/enc-utf8';
import md5 from 'crypto-js/md5';
import ECB from 'crypto-js/mode-ecb';
import pkcs7 from 'crypto-js/pad-pkcs7'; import pkcs7 from 'crypto-js/pad-pkcs7';
import ECB from 'crypto-js/mode-ecb';
import md5 from 'crypto-js/md5';
import Base64 from 'crypto-js/enc-base64';
export interface EncryptionParams { export interface EncryptionParams {
key: string key: string

View File

@ -1,5 +1,5 @@
import { isH5 } from '@/utils/platform';
import pkg from '../../package.json'; import pkg from '../../package.json';
import { isH5 } from '@/utils/platform';
/** /**
* @description: Generate cache key according to version * @description: Generate cache key according to version

View File

@ -1,5 +1,5 @@
import { ResultEnum } from '@/enums/httpEnum';
import { Toast } from '@/utils/uniapi/prompt'; import { Toast } from '@/utils/uniapi/prompt';
import { ResultEnum } from '@/enums/httpEnum';
/** /**
* Http错误处理 * Http错误处理

View File

@ -1,12 +1,12 @@
import type { API } from '@/services/model/baseModel';
import { ContentTypeEnum, ResultEnum } from '@/enums/httpEnum';
import { mockAdapter } from '@/mock';
import { getAuthorization } from '@/utils/auth';
import { getBaseUrl, isUseMock } from '@/utils/env';
import AdapterUniapp from '@alova/adapter-uniapp';
import { createAlova } from 'alova'; import { createAlova } from 'alova';
import AdapterUniapp from '@alova/adapter-uniapp';
import { assign } from 'lodash-es'; import { assign } from 'lodash-es';
import { handleHttpStatus, handleLogicError } from './faultTolerance'; import { handleHttpStatus, handleLogicError } from './faultTolerance';
import { getBaseUrl, isUseMock } from '@/utils/env';
import { mockAdapter } from '@/mock';
import { ContentTypeEnum, ResultEnum } from '@/enums/httpEnum';
import type { API } from '@/services/model/baseModel';
import { getAuthorization } from '@/utils/auth';
const BASE_URL = getBaseUrl(); const BASE_URL = getBaseUrl();

32
tailwind.config.js Normal file
View File

@ -0,0 +1,32 @@
import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons';
import { isMp } from './build/platform';
const spacing = {
0: '0px',
};
let i = 0;
while (i <= 750) {
spacing[`${i}px`] = `${i}px`;
spacing[`${i}rpx`] = `${i}rpx`;
i++;
}
/** @type {import('tailwindcss').Config} */
export default {
content: ['./public/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}'],
theme: {
extend: {
spacing,
},
},
corePlugins: {
// 小程序去使用 h5 的 preflight 和响应式 container 没有意义
preflight: !isMp,
container: !isMp,
},
plugins: [iconsPlugin({
collections: getIconCollections(['mdi', 'svg-spinners']),
})],
};

View File

@ -1,69 +0,0 @@
import { defineConfig, presetIcons } from 'unocss';
import presetWeapp from 'unocss-preset-weapp';
import { transformerAttributify, transformerClass } from 'unocss-preset-weapp/transformer';
import { isWeixinMp } from './build/platform';
const prefix = '';
const transformRules = {
'.': '-d2e-',
'/': '-s2f-',
':': '-c3a-',
'%': '-p25-',
'!': '-e21-',
'#': '-w23-',
'(': '-b28-',
')': '-b29-',
'[': '-f4b-',
']': '-f5d-',
'$': '-r24-',
',': '-r2c-',
};
export default defineConfig({
presets: [
// https://github.com/MellowCo/unocss-preset-weapp
presetWeapp({
prefix,
whRpx: false,
transform: isWeixinMp as boolean,
platform: 'uniapp',
transformRules,
}) as any,
presetIcons({
scale: 1.2,
warn: true,
}),
],
shortcuts: [
{
center: 'flex justify-center items-center',
},
],
theme: {
colors: {
primary: '#007AFF',
secondary: '#4CD964',
danger: '#FF3B30',
warning: '#FF9500',
info: '#5AC8FA',
light: '#F0F0F0',
dark: '#1A1A1A',
},
fontSize: {
mini: ['20rpx', '26rpx'],
},
},
transformers: [
// options https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
transformerAttributify({
classPrefix: prefix,
transformRules,
nonValuedAttribute: true,
}) as any,
// options https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
transformerClass({
transformRules,
}),
],
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,4 +1,3 @@
import type { UserConfig } from 'vite';
/** /**
* vite * vite
* @see https://cn.vitejs.dev/config/ * @see https://cn.vitejs.dev/config/
@ -6,10 +5,11 @@ import type { UserConfig } from 'vite';
*/ */
import { resolve } from 'node:path'; import { resolve } from 'node:path';
import process from 'node:process'; import process from 'node:process';
import TransformPages from 'uni-read-pages-vite'; import type { UserConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite'; import { defineConfig, loadEnv } from 'vite';
import TransformPages from 'uni-read-pages-vite';
import postcssPlugins from './postcss.config';
import { createVitePlugins, currentPlatform, resolveProxy } from './build'; import { createVitePlugins, currentPlatform, resolveProxy } from './build';
// import postcssPlugins from './postcss.config';
export default defineConfig(async ({ mode }) => { export default defineConfig(async ({ mode }) => {
const root = process.cwd(); const root = process.cwd();
@ -35,10 +35,12 @@ export default defineConfig(async ({ mode }) => {
css: { css: {
preprocessorOptions: { preprocessorOptions: {
scss: { scss: {
api: 'modern-compiler', // 或 'modern' 表示使用现代编译器 additionalData: '@import "./src/uni.scss";',
silenceDeprecations: ['legacy-js-api'],
}, },
}, },
postcss: {
plugins: postcssPlugins,
},
}, },
plugins: createVitePlugins({ isProd }), plugins: createVitePlugins({ isProd }),
// 开发服务器配置 // 开发服务器配置
@ -46,7 +48,7 @@ export default defineConfig(async ({ mode }) => {
host: true, host: true,
// open: true, // open: true,
port: Number.parseInt(VITE_PORT!, 10), port: Number.parseInt(VITE_PORT!, 10),
proxy: resolveProxy([[VITE_PROXY_PREFIX!, VITE_BASE_URL!], [VITE_UPLOAD_PROXY_PREFIX!, VITE_UPLOAD_URL!]]), proxy: resolveProxy([[VITE_PROXY_PREFIX, VITE_BASE_URL], [VITE_UPLOAD_PROXY_PREFIX, VITE_UPLOAD_URL]]),
}, },
// 构建配置 // 构建配置
build: { build: {