提交 defd1942 authored 作者: vipcxj's avatar vipcxj

code clean

上级 39e575ac
...@@ -118,14 +118,7 @@ const createRoutes = async (app, modules, groups, basePath) => { ...@@ -118,14 +118,7 @@ const createRoutes = async (app, modules, groups, basePath) => {
fullPath: combinePath(basePath, name), fullPath: combinePath(basePath, name),
name: showName, name: showName,
}; };
// let modelBundle;
if (layout.route) { if (layout.route) {
// modelBundle = await import(`./models/main/modules/${layout.route}`);
// modelBundle = modelBundle.default;
// if (typeof modelBundle === 'function') {
// modelBundle = modelBundle(info, layout);
// }
// registerModel(app, modelBundle);
let routeBundle = await import(`./routes/main/modules/${layout.route}`); let routeBundle = await import(`./routes/main/modules/${layout.route}`);
routeBundle = routeBundle.default || routeBundle; routeBundle = routeBundle.default || routeBundle;
const binder = bindModel(app, info, layout); const binder = bindModel(app, info, layout);
...@@ -143,15 +136,6 @@ const createRoutes = async (app, modules, groups, basePath) => { ...@@ -143,15 +136,6 @@ const createRoutes = async (app, modules, groups, basePath) => {
} else { } else {
route.component = Monk; route.component = Monk;
} }
// let model;
// if (modelBundle) {
// model = {};
// model.namespace = modelBundle.namespace;
// model.reducerEnterHook = modelBundle.reducers && !!modelBundle.reducers['@@enter'];
// model.effectEnterHook = modelBundle.effects && !!modelBundle.effects['@@enter'];
// model.reducerExitHook = modelBundle.reducers && !!modelBundle.reducers['@@exit'];
// model.effectExitHook = modelBundle.effects && !!modelBundle.effects['@@exit'];
// }
const infoEx = { const infoEx = {
...info, ...info,
path: route.fullPath, path: route.fullPath,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论