From 10ed0520bf13a9fd93d6a8050fbce14652493ba3 Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期四, 02 一月 2025 18:26:39 +0800
Subject: [PATCH] 将动态路由的path用菜单id赋值

---
 Source/plt-web/plt-web-ui/src/router/avue-router.js |    6 +++---
 Source/plt-web/plt-web-ui/src/store/modules/user.js |    4 ++--
 Source/plt-web/plt-web-ui/src/config/website.js     |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/config/website.js b/Source/plt-web/plt-web-ui/src/config/website.js
index 2d76c5b..3d4ce67 100644
--- a/Source/plt-web/plt-web-ui/src/config/website.js
+++ b/Source/plt-web/plt-web-ui/src/config/website.js
@@ -36,7 +36,7 @@
     iconDefault: 'codicon:gear',
     props: {
       label: 'name',
-      path: 'path',
+      path: 'path',//璺敱path
       icon: 'source',
       children: 'children'
     }
diff --git a/Source/plt-web/plt-web-ui/src/router/avue-router.js b/Source/plt-web/plt-web-ui/src/router/avue-router.js
index 8236f72..e3f8fbe 100644
--- a/Source/plt-web/plt-web-ui/src/router/avue-router.js
+++ b/Source/plt-web/plt-web-ui/src/router/avue-router.js
@@ -98,10 +98,10 @@
       // 璁剧疆 props榛樿鍊� 浣滅敤灏辨槸灏嗗瓧娈佃缃垚閰嶇疆鐨�
       const propsDefault = {
         label: propsConfig.label || 'name',
-        path: 'code',
-        code: 'code',
+        path: propsConfig.path,
+        code: 'id',//鍙栧敮涓�鏍囪瘑
         pathValue: 'pathValue',
-        icon: propsConfig.icon || 'icon',
+        icon: propsConfig.icon || 'source',
         children: propsConfig.children || 'children',
         meta: propsConfig.meta || 'meta',
       }
diff --git a/Source/plt-web/plt-web-ui/src/store/modules/user.js b/Source/plt-web/plt-web-ui/src/store/modules/user.js
index 8e1fbc3..3a33a35 100644
--- a/Source/plt-web/plt-web-ui/src/store/modules/user.js
+++ b/Source/plt-web/plt-web-ui/src/store/modules/user.js
@@ -16,7 +16,7 @@
   const propsDefault = {
     label: propsConfig.label || 'name',
     path: propsConfig.path || 'path',
-    icon: propsConfig.icon || 'icon',
+    icon: propsConfig.icon || 'source',
     children: propsConfig.children || 'children',
   }
   const icon = ele[propsDefault.icon];
@@ -36,7 +36,7 @@
 function updateCode(items) {
   items.forEach(item => {
     item.pathValue = item.path;
-    item.path = '/' + item.code;
+    item.path = '/' + item.id;
     item.query = {}; // 鍒濆鍖� item.query
     if (item.pathValue.indexOf('?') != -1) {
       item.query = queryStringToObject(item.pathValue)

--
Gitblit v1.9.3