forked from github/dataease
Merge pull request #2818 from dataease/pr@dev@perf_theme_form_router
perf(系统管理-主题设置): 适配新版UI增加主题表单路由
This commit is contained in:
commit
6f6e99bda4
@ -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();
|
||||
|
@ -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}`)()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user