From fd4419389491c6bb1efbea32e0cb3ffd07e8a5c2 Mon Sep 17 00:00:00 2001 From: tnt group Date: Tue, 25 Jun 2024 01:28:30 +0800 Subject: [PATCH 01/18] =?UTF-8?q?feat:=20=E5=BC=95=E5=85=A5=20`uni-vue-dev?= =?UTF-8?q?tools`=EF=BC=8C=E5=B9=B6=E9=85=8D=E7=BD=AE=20`dev:mp-weixin`=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 14568e8..202982f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev:mp-lark": "uni -p mp-lark", "dev:mp-qq": "uni -p mp-qq", "dev:mp-toutiao": "uni -p mp-toutiao", - "dev:mp-weixin": "pnpm git:hooks && uni -p mp-weixin", + "dev:mp-weixin": "pnpm git:hooks && uni -p mp-weixin --devtools", "dev:quickapp-webview": "uni -p quickapp-webview", "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", "dev:quickapp-webview-union": "uni -p quickapp-webview-union", @@ -63,6 +63,7 @@ "@dcloudio/uni-automator": "3.0.0-alpha-4010920240607001", "@dcloudio/uni-cli-shared": "3.0.0-alpha-4010920240607001", "@dcloudio/uni-stacktracey": "3.0.0-alpha-4010920240607001", + "@dcloudio/uni-vue-devtools": "3.0.0-alpha-4010920240607001", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4010920240607001", "@iconify/vue": "^4.1.2", "@types/crypto-js": "^4.2.2", From 1a9d4b91813cea900210cc4f799abdb84047b729 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Tue, 25 Jun 2024 08:54:45 +0800 Subject: [PATCH 02/18] =?UTF-8?q?chore(deps):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=80=A7=E5=92=8C=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新了多个包的版本,包括 `@alova/mock`、`@dcloudio/uni-app` 系列、`vue`、`@types/node`、`sass`、`tsx` 和 `typescript`等。这次更新主要是为了引入最新的特性、修复已知的问题以及提高代码的稳定性和安全性。 具体变更如下: - `@alova/mock` 从 `1.5.1` 更新到 `1.5.2` - `@dcloudio/uni-app` 系列包更新至 `3.0.0-alpha-4020220240624001` - `vue` 从 `3.4.29` 更新到 `3.4.30` - `@types/node` 从 `20.14.2` 更新到 `20.14.8` - `sass` 从 `1.77.5` 更新到 `1.77.6` - `tsx` 从 `4.15.4` 更新到 `4.15.7` - `typescript` 从 ` --- package.json | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 202982f..a5ad6fd 100644 --- a/package.json +++ b/package.json @@ -36,52 +36,52 @@ }, "dependencies": { "@alova/adapter-uniapp": "^1.2.2", - "@alova/mock": "^1.5.1", - "@dcloudio/uni-app": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-app-plus": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-components": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-h5": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-i18n": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-alipay": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-baidu": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-lark": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-qq": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-mp-weixin": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4010920240607001", + "@alova/mock": "^1.5.2", + "@dcloudio/uni-app": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-app-plus": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-components": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-h5": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-i18n": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-alipay": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-baidu": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-lark": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-qq": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-mp-weixin": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4020220240624001", "@multiavatar/multiavatar": "^1.0.7", "alova": "^2.21.3", "crypto-js": "^4.2.0", "lodash-es": "^4.17.21", "pinia": "^2.1.7", - "vue": "^3.4.29" + "vue": "^3.4.30" }, "devDependencies": { "@antfu/eslint-config": "^2.21.1", "@dcloudio/types": "^3.4.8", - "@dcloudio/uni-automator": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-cli-shared": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-stacktracey": "3.0.0-alpha-4010920240607001", - "@dcloudio/uni-vue-devtools": "3.0.0-alpha-4010920240607001", - "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4010920240607001", + "@dcloudio/uni-automator": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-cli-shared": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-stacktracey": "3.0.0-alpha-4020220240624001", + "@dcloudio/uni-vue-devtools": "3.0.0-alpha-4020220240624001", + "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020220240624001", "@iconify/vue": "^4.1.2", "@types/crypto-js": "^4.2.2", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.14.2", + "@types/node": "^20.14.8", "@unocss/eslint-plugin": "^0.61.0", "@vitejs/plugin-vue": "^5.0.5", - "@vue/runtime-core": "^3.4.29", - "eslint": "^9.4.0", - "eslint-plugin-format": "^0.1.1", - "globals": "^15.4.0", + "@vue/runtime-core": "^3.4.30", + "eslint": "^9.5.0", + "eslint-plugin-format": "^0.1.2", + "globals": "^15.6.0", "lint-staged": "^15.2.7", "picocolors": "^1.0.1", "rollup-plugin-visualizer": "^5.12.0", - "sass": "^1.77.5", + "sass": "^1.77.6", "simple-git-hooks": "^2.11.1", - "tsx": "^4.15.4", - "typescript": "^5.4.5", + "tsx": "^4.15.7", + "typescript": "^5.5.2", "uni-mini-router": "^0.1.6", "uni-read-pages-vite": "^0.0.6", "unocss": "^0.61.0", From 81d1b6c707f498d5bb93f73b3d6a1484e54d2703 Mon Sep 17 00:00:00 2001 From: tnt group Date: Wed, 26 Jun 2024 15:39:00 +0800 Subject: [PATCH 03/18] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=AD=A3=E7=A1=AE=E9=85=8D=E7=BD=AE=20eslint=20?= =?UTF-8?q?=E6=89=81=E5=B9=B3=E5=8C=96=E9=85=8D=E7=BD=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.js | 72 +++++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 530a235..98b72d7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -7,39 +7,43 @@ import antfu from '@antfu/eslint-config'; * @see https://github.com/antfu/eslint-config */ -export default antfu({ - formatters: true, - vue: true, - jsx: true, - unocss: true, - rules: { - 'style/indent': ['error', 2, { SwitchCase: 2 }], - 'style/quotes': ['error', 'single'], - 'style/semi': ['error', 'always'], - 'style/semi-style': ['error', 'last'], - 'style/max-len': ['error', { - code: 160, - tabWidth: 2, - ignoreUrls: true, - ignoreComments: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - ignoreRegExpLiterals: true, - }], - 'style/brace-style': ['error', '1tbs', { allowSingleLine: true }], - 'vue/script-indent': ['error', 2, { baseIndent: 0 }], - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', - 'no-useless-catch': 'off', +export default antfu( + { + formatters: true, + vue: true, + jsx: true, + unocss: true, + env: { + node: true, + }, + ignores: [ + './dist/*', + './.vscode/*', + './.idea/*', + '**/androidPrivacy.json', + 'README.md', + ], }, - env: { - node: true, + { + rules: { + 'style/indent': ['error', 2, { SwitchCase: 2 }], + 'style/quotes': ['error', 'single'], + 'style/semi': ['error', 'always'], + 'style/semi-style': ['error', 'last'], + 'style/max-len': ['error', { + code: 160, + tabWidth: 2, + ignoreUrls: true, + ignoreComments: true, + ignoreStrings: true, + ignoreTemplateLiterals: true, + ignoreRegExpLiterals: true, + }], + 'style/brace-style': ['error', '1tbs', { allowSingleLine: true }], + 'vue/script-indent': ['error', 2, { baseIndent: 0 }], + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-useless-catch': 'off', + }, }, - ignores: [ - './dist/*', - './.vscode/*', - './.idea/*', - '**/androidPrivacy.json', - 'README.md', - ], -}); +); diff --git a/package.json b/package.json index a5ad6fd..0c3bd7e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "build:quickapp-webview": "uni build -p quickapp-webview", "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei", "build:quickapp-webview-union": "uni build -p quickapp-webview-union", - "lint:fix": "eslint . --fix --ignore-pattern '*/androidPrivacy.json' --ignore-pattern 'README.md'", + "lint:fix": "eslint . --fix", "git:hooks": "npx simple-git-hooks" }, "dependencies": { From b26db07d1b8dae25c70cd6370ffcb3314093b725 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Wed, 26 Jun 2024 15:48:28 +0800 Subject: [PATCH 04/18] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20eslint=20?= =?UTF-8?q?=E6=89=81=E5=B9=B3=E5=8C=96=E9=85=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 lint-staged 配置中的 eslint 命令修改为 "eslint . --fix",以正确处理所有需要 lint 的文件。 之前的配置遗漏了对根目录下文件的处理,导致部分文件未被 lint。 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c3bd7e..0a14a84 100644 --- a/package.json +++ b/package.json @@ -96,6 +96,6 @@ "commit-msg": "npx tsx ./scripts/verify-commit.ts" }, "lint-staged": { - "*": "eslint --fix --ignore-pattern '*/androidPrivacy.json' --ignore-pattern 'README.md'" + "*": "eslint . --fix" } } From f6b06d5a612c181046384e3bb15e390c0d342504 Mon Sep 17 00:00:00 2001 From: tnt group Date: Wed, 26 Jun 2024 18:07:58 +0800 Subject: [PATCH 05/18] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20iconify=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=8F=AF=E4=BB=BB=E6=84=8F=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=85=A8=E7=BD=91=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/Iconify/index.vue | 39 ++++++++++++++++++++++++++++++++ src/pages/demo/index.vue | 12 +++++++++- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 src/components/Iconify/index.vue diff --git a/package.json b/package.json index 0c3bd7e..6265ca8 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@dcloudio/uni-stacktracey": "3.0.0-alpha-4020220240624001", "@dcloudio/uni-vue-devtools": "3.0.0-alpha-4020220240624001", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020220240624001", - "@iconify/vue": "^4.1.2", + "@iconify/json": "^2.2.206", "@types/crypto-js": "^4.2.2", "@types/lodash-es": "^4.17.12", "@types/node": "^20.14.8", diff --git a/src/components/Iconify/index.vue b/src/components/Iconify/index.vue new file mode 100644 index 0000000..40b470f --- /dev/null +++ b/src/components/Iconify/index.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index c64a43d..239c2e1 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -1,10 +1,20 @@ From 97487974c2cc2058779fb7a5824b158e7b600da7 Mon Sep 17 00:00:00 2001 From: tnt group Date: Wed, 26 Jun 2024 18:25:56 +0800 Subject: [PATCH 06/18] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84=E5=A4=A7=E5=B0=8F=E5=86=99=E6=89=8B?= =?UTF-8?q?=E8=AF=AF=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/demo/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index 239c2e1..304f519 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -1,5 +1,5 @@ From 51dc1e69dbaf58bd233c7c259a6a0a5cc1ef04ca Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Wed, 26 Jun 2024 18:53:33 +0800 Subject: [PATCH 07/18] =?UTF-8?q?feat(readme):=20=E6=9B=B4=E6=96=B0=20Vite?= =?UTF-8?q?=20=E5=92=8C=20ESLint=20=E7=89=88=E6=9C=AC=E5=8F=B7=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ad94989..115205a 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ - + - + @@ -35,7 +35,7 @@ ## 简介 -- **uni-app Vue3 Vite4 pinia2 TypeScript 基础框架** +- **uni-app Vue3 Vite5 pinia2 TypeScript 基础框架** - cli 创建的 Vue3/Vite 项目 与 使用 HBuilderX 导入插件 的包有差异,请直接访问 [开源地址](https://gitee.com/h_mo/uniapp-vue3-vite-ts-template) - 访问[uniapp 插件](https://ext.dcloud.net.cn/plugin?id=8559) - 如有问题请加群【[872378674](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=T3PX4_sWeMXeFGWF6EZJLXABSNyStYR0&authKey=EYXATTrGpmyowFxk9xtX6T7FIRbOF7brLd9uODxl%2B6jIbGfWQGW869V1hkPSlGYT&noverify=0&group_code=872378674)】交流 @@ -44,11 +44,9 @@ - 框架完全基于 Vue3 SFC ` diff --git a/src/main.ts b/src/main.ts index c4c1a43..c723877 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,5 @@ import { createSSRApp } from 'vue'; import App from './App.vue'; -import 'virtual:uno.css'; import { setupRouter } from './router'; import { setupStore } from './stores'; diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index 304f519..e4a9905 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -5,7 +5,7 @@ const demo = ref('Demo');