From 98746fbca549615e429029fe64c5e89f0f3b44bc Mon Sep 17 00:00:00 2001 From: pixelmaxQM Date: Wed, 26 Mar 2025 20:35:10 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/package.json b/web/package.json index 82bf3619..7929b9aa 100644 --- a/web/package.json +++ b/web/package.json @@ -51,9 +51,9 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.25.1", - "@eslint/js": "^9.14.0", - "@vitejs/plugin-legacy": "^5.4.2", - "@vitejs/plugin-vue": "^5.1.4", + "@eslint/js": "^8.56.0", + "@vitejs/plugin-legacy": "^5.2.0", + "@vitejs/plugin-vue": "^5.0.3", "@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8", "@vue/cli-plugin-router": "~5.0.8", @@ -63,13 +63,13 @@ "babel-plugin-import": "^1.13.8", "chalk": "^5.3.0", "dotenv": "^16.4.5", - "eslint": "^9.14.0", - "eslint-plugin-vue": "^9.30.0", + "eslint": "^8.57.0", + "eslint-plugin-vue": "^9.19.2", "sass": "^1.78.0", "terser": "^5.31.6", - "vite": "^5.4.3", + "vite": "^6.2.3", "vite-plugin-banner": "^0.8.0", "vite-plugin-importer": "^0.2.5", - "vite-plugin-vue-devtools": "^7.4.4" + "vite-plugin-vue-devtools": "^7.0.16" } } From 7e7ec52290646b62598f22d10c39818d720c37ee Mon Sep 17 00:00:00 2001 From: pixelmaxQM Date: Thu, 27 Mar 2025 22:24:20 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E9=98=B2=E6=AD=A2npm=20i=20?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index 7929b9aa..3870ea32 100644 --- a/web/package.json +++ b/web/package.json @@ -52,7 +52,7 @@ "devDependencies": { "@babel/eslint-parser": "^7.25.1", "@eslint/js": "^8.56.0", - "@vitejs/plugin-legacy": "^5.2.0", + "@vitejs/plugin-legacy": "^6.0.0", "@vitejs/plugin-vue": "^5.0.3", "@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8", From 9806f72ca6a7dca0f0d561cfa951243c414d953d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?piexlMax=28=E5=A5=87=E6=B7=BC?= Date: Tue, 1 Apr 2025 14:23:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E8=AE=BE=E4=B8=BA=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=98=B2=E6=AD=A2=E4=BA=8B=E4=BB=B6=E7=A9=BF?= =?UTF-8?q?=E9=80=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/superAdmin/authority/components/menus.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/view/superAdmin/authority/components/menus.vue b/web/src/view/superAdmin/authority/components/menus.vue index 8e2d1c60..79791e79 100644 --- a/web/src/view/superAdmin/authority/components/menus.vue +++ b/web/src/view/superAdmin/authority/components/menus.vue @@ -31,7 +31,7 @@ color: row.defaultRouter === data.name ? '#E6A23C' : '#85ce61' }" - @click="() => setDefault(data)" + @click.stop="() => setDefault(data)" > {{ row.defaultRouter === data.name ? '首页' : '设为首页' }} From 83eb193f1bbd7e7d247e94c79f195602360f84a3 Mon Sep 17 00:00:00 2001 From: huiyifyj Date: Tue, 1 Apr 2025 16:26:31 +0800 Subject: [PATCH 4/5] fix UseWithCtx method to check for nil context - Add nil check for context parameter. - UseWithCtx method return explicit type rather than interface. Replace base64Captcha.Store return type with *RedisStore for better type safety. --- server/utils/captcha/redis.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/utils/captcha/redis.go b/server/utils/captcha/redis.go index a13b7cc1..ffb4dbf7 100644 --- a/server/utils/captcha/redis.go +++ b/server/utils/captcha/redis.go @@ -5,7 +5,6 @@ import ( "time" "github.com/flipped-aurora/gin-vue-admin/server/global" - "github.com/mojocn/base64Captcha" "go.uber.org/zap" ) @@ -23,8 +22,10 @@ type RedisStore struct { Context context.Context } -func (rs *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store { - rs.Context = ctx +func (rs *RedisStore) UseWithCtx(ctx context.Context) *RedisStore { + if ctx == nil { + rs.Context = ctx + } return rs } From 8bec94336bc266f2dfb20f66a6f4ecb9ddc5609e Mon Sep 17 00:00:00 2001 From: huiyifyj Date: Tue, 1 Apr 2025 16:46:36 +0800 Subject: [PATCH 5/5] test: fix missing `isPackage` argument called method --- server/service/system/auto_code_package_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/server/service/system/auto_code_package_test.go b/server/service/system/auto_code_package_test.go index 94285e97..d2a54739 100644 --- a/server/service/system/auto_code_package_test.go +++ b/server/service/system/auto_code_package_test.go @@ -2,10 +2,11 @@ package system import ( "context" - model "github.com/flipped-aurora/gin-vue-admin/server/model/system" - "github.com/flipped-aurora/gin-vue-admin/server/model/system/request" "reflect" "testing" + + model "github.com/flipped-aurora/gin-vue-admin/server/model/system" + "github.com/flipped-aurora/gin-vue-admin/server/model/system/request" ) func Test_autoCodePackage_Create(t *testing.T) { @@ -53,9 +54,10 @@ func Test_autoCodePackage_Create(t *testing.T) { func Test_autoCodePackage_templates(t *testing.T) { type args struct { - ctx context.Context - entity model.SysAutoCodePackage - info request.AutoCode + ctx context.Context + entity model.SysAutoCodePackage + info request.AutoCode + isPackage bool } tests := []struct { name string @@ -78,6 +80,7 @@ func Test_autoCodePackage_templates(t *testing.T) { Abbreviation: "user", HumpPackageName: "user", }, + isPackage: false, }, wantErr: false, }, @@ -85,7 +88,7 @@ func Test_autoCodePackage_templates(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { s := &autoCodePackage{} - gotCode, gotEnter, gotCreates, err := s.templates(tt.args.ctx, tt.args.entity, tt.args.info) + gotCode, gotEnter, gotCreates, err := s.templates(tt.args.ctx, tt.args.entity, tt.args.info, tt.args.isPackage) if (err != nil) != tt.wantErr { t.Errorf("templates() error = %v, wantErr %v", err, tt.wantErr) return