From 9f086e6027543c597cd53e95d15777875c7d28e6 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 08 四月 2024 12:15:36 +0800
Subject: [PATCH] UIEngineServiceImpl类中相关修改
---
Source/ProjectWeb/src/router/avue-router.js | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/Source/ProjectWeb/src/router/avue-router.js b/Source/ProjectWeb/src/router/avue-router.js
index 933f2a5..e8f5e4b 100644
--- a/Source/ProjectWeb/src/router/avue-router.js
+++ b/Source/ProjectWeb/src/router/avue-router.js
@@ -90,15 +90,15 @@
* first: 涓轰簡鍖哄垎澶栫晫 璋冪敤formatRoutes 鍜� 褰撳墠鏂囦欢璋冪敤 formatRoutes
*/
formatRoutes: function (aMenu = [], first) {
- // debugger;
const aRouter = []
// 鑾峰彇鍒板叏灞�閰嶇疆涓殑 props
const propsConfig = this.$website.menu.props;
// 璁剧疆 props榛樿鍊� 浣滅敤灏辨槸灏嗗瓧娈佃缃垚閰嶇疆鐨�
const propsDefault = {
label: propsConfig.label || 'name',
- path: 'code',
- pathValue:propsConfig.path || 'path',
+ path:'code',
+ code: 'code',
+ pathValue:'pathValue',
icon: propsConfig.icon || 'icon',
children: propsConfig.children || 'children',
meta: propsConfig.meta || 'meta',
@@ -119,17 +119,15 @@
}
})();
let code = (() => {
- return oMenu[propsDefault.path]
+ return oMenu[propsDefault.code]
})();
// 灏嗗瓧绗︿覆鍒嗗壊鎴愭暟缁勶紝浠�'?'浣滀负鍒嗛殧绗�
let parts = path.split("?");
// 濡傛灉鏁扮粍鐨勯暱搴﹀ぇ浜�1锛岃〃绀烘湁'?'锛屽垯鍙栫涓�涓厓绱犵殑绗竴涓儴鍒嗭紝鍚﹀垯鐩存帴鍙栨暣涓瓧绗︿覆
let bsValue = parts.length > 1 ? parts[0].split("=")[1] : path.split("=")[1];
-
- if (bsValue ==='' || bsValue === undefined || bsValue === null ) {
+ if (bsValue === '' || bsValue === undefined || bsValue === null) {
bsValue = "UI";
}
-
//鐗规畩澶勭悊缁勪欢 鎵ц瀹岃繖涓� component 涔熷氨鏄簿纭埌鍏蜂綋鐨勬枃浠朵簡 views鏂囦欢澶逛笅闈㈠氨鏄叿浣撶殑椤甸潰浠g爜
let component = bsValue === 'UI' ? 'views/base/UIContentViewer' : `views/custom-ui/${bsValue}`,
name = oMenu[propsDefault.label],
@@ -147,7 +145,7 @@
//鏄惁鏈夊瓙璺敱
const isChild = children.length !== 0;
const oRouter = {
- path: code,
+ path: '/' + code,
component(resolve) {
// 鍒ゆ柇鏄惁涓洪璺敱
if (first) {
@@ -175,7 +173,7 @@
children: !isChild ? (() => {
if (first) {
// 杩欓噷鐨刬sURL鍒ゆ柇锛屽洜涓鸿繖涓綉绔欐湁浣跨敤 iframe銆傛墍浠ラ渶瑕佸垽鏂槸鍚︿负缃戦〉閾炬帴
- if (!isURL(path)) oMenu[propsDefault.path] = `${path}/index`;
+ if (!isURL(path)) oMenu[propsDefault.pathValue] = `${path}/index`;
return [{
component(resolve) {
require([`../${component}.vue`], resolve)
--
Gitblit v1.9.3