From 7de94e2ea37803216e5afe9d40e7121c87a5344e Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期四, 24 四月 2025 14:21:14 +0800 Subject: [PATCH] 富文本复制粘贴图片上传至url --- src/store/modules/permission.js | 25 +++++++------------------ 1 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index c1c862b..e1ef717 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -85,24 +85,13 @@ function filterChildren(childrenMap, lastRouter = false) { var children = [] - childrenMap.forEach((el, index) => { - if (el.children && el.children.length) { - if (el.component === 'ParentView' && !lastRouter) { - el.children.forEach(c => { - c.path = el.path + '/' + c.path - if (c.children && c.children.length) { - children = children.concat(filterChildren(c.children, c)) - return - } - children.push(c) - }) - return - } + childrenMap.forEach(el => { + el.path = lastRouter ? lastRouter.path + '/' + el.path : el.path + if (el.children && el.children.length && el.component === 'ParentView') { + children = children.concat(filterChildren(el.children, el)) + } else { + children.push(el) } - if (lastRouter) { - el.path = lastRouter.path + '/' + el.path - } - children = children.concat(el) }) return children } @@ -132,7 +121,7 @@ res = () => modules[path](); } } - return res; + return res } export default usePermissionStore -- Gitblit v1.9.3