From 93af48c6fccf6977f2d97d17806ea0aec13790d4 Mon Sep 17 00:00:00 2001
From: K <1175047471@qq.com>
Date: Fri, 12 Apr 2024 16:47:00 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC?=
 =?UTF-8?q?=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/store/modules/user.ts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 1b9987e4..bae9af22 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -157,11 +157,15 @@ export const useUserStore = defineStore('app-user', {
 
           const component = __menu.path.replaceAll(/\/:[\s|\S]*/g, '')
 
+          let isPadIndexExtension = false
+          if (!component.endsWith('index') && !/\/:/.test(__menu.path))
+            isPadIndexExtension = true
+
           menus.push({
             id: __menu.id,
             parentId: __menu.parentId,
             name: __menu.name,
-            component: `${component}${component.endsWith('index') ? '' : '/index'}.vue`,
+            component: `${component}${isPadIndexExtension ? '/index' : ''}.vue`,
             componentName,
             path: __menu.path,
             icon: __menu.source,