Merge pull request #2818 from dataease/pr@dev@perf_theme_form_router

perf(系统管理-主题设置): 适配新版UI增加主题表单路由
This commit is contained in:
fit2cloud-chenyw 2022-08-10 11:50:40 +08:00 committed by GitHub
commit 6f6e99bda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -33,7 +33,7 @@ public class PluginCommonServer {
List<PluginSysMenu> menus = service.menus();
if (menus.stream().anyMatch(menu -> {
atomicReference.set(menu);
return menu.getMenuId() == menuId;
return menu.getMenuId().equals(menuId);
})) {
String jsName = atomicReference.get().getComponent();
HttpServletResponse response = ServletUtils.response();

View File

@ -49,12 +49,12 @@ export default {
} else {
res = await window.SyncComponentCache[this.url]
}
if (res) {
const Fn = Function
this.mode = new Fn(`return ${res.data || res}`)()
/* if (res && res.data) {
const Fn = Function
this.mode = new Fn(`return ${res.data || res}`)()
} */
const dynamicCode = res.data || res
this.mode = new Fn(`return ${dynamicCode}`)()
}
}
}
},

View File

@ -29,11 +29,10 @@ const actions = {
commit('SET_CURRENT_PATH', path)
}
}
export const fullScreenRouters = ['XpackThemeForm']
export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由字符串,转换为组件对象
return routers.map(router => {
// 如果是菜单类型 且 是一级菜单 需要包装一层父级目录
if (router.type === 1 && router.pid === 0 && router.component && router.component !== 'Layout') {
if (!fullScreenRouters.includes(router.component) && router.type === 1 && router.pid === 0 && router.component && router.component !== 'Layout') {
router = decorate(router)
}
if (router.isPlugin) {