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 | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) 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 52c14c9..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', } @@ -181,7 +181,7 @@ meta: meta, redirect: (() => { // 绗竴娆¤繘鏉ヤ絾鏄病鏈夊瓙璺敱鐨� 闇�瑕佹坊鍔爎edirect - if (!isChild && first && !isURL(path)) return `${path}/index` + if (!isChild && first && !isURL(path)) return `/${code}/index` else return ''; })(), // 鏁寸悊瀛愯矾鐢辩殑route 閰嶇疆 -- Gitblit v1.9.3