|
|
@ -7,9 +7,10 @@ import { Provider } from "mobx-react";
|
|
|
|
import zhCN from "antd/lib/locale/zh_CN";
|
|
|
|
import zhCN from "antd/lib/locale/zh_CN";
|
|
|
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
|
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
|
|
import { connect, IRouteComponentProps, useModel } from "umi";
|
|
|
|
import { connect, IRouteComponentProps, useModel } from "umi";
|
|
|
|
import BaseLayout from "./BaseLayout";
|
|
|
|
// import BaseLayout from "./BaseLayout";
|
|
|
|
import BlankLayout from "./BlankLayout";
|
|
|
|
import BlankLayout from "./BlankLayout";
|
|
|
|
import UserLayout from "./UserLayout";
|
|
|
|
// import UserLayout from "./UserLayout";
|
|
|
|
|
|
|
|
import PageEmptyLayout from "./PageEmptyLayout";
|
|
|
|
import { IRouterProps, RouterContext } from "./RouterContext";
|
|
|
|
import { IRouterProps, RouterContext } from "./RouterContext";
|
|
|
|
import { layoutConfig } from "@/layouts/config";
|
|
|
|
import { layoutConfig } from "@/layouts/config";
|
|
|
|
import stores from "@/store";
|
|
|
|
import stores from "@/store";
|
|
|
@ -64,18 +65,18 @@ const Layout = ({ children, location, route, history, match }: IRouteComponentPr
|
|
|
|
|
|
|
|
|
|
|
|
if (type) {
|
|
|
|
if (type) {
|
|
|
|
switch (type) {
|
|
|
|
switch (type) {
|
|
|
|
case "user":
|
|
|
|
// case "user":
|
|
|
|
layout = <UserLayout {...props} />;
|
|
|
|
// layout = <UserLayout {...props} />;
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case "blank":
|
|
|
|
case "blank":
|
|
|
|
layout = <BlankLayout {...props} />;
|
|
|
|
layout = <BlankLayout {...props} />;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
layout = <BaseLayout {...props} />;
|
|
|
|
layout = <PageEmptyLayout {...props} />;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
layout = <BaseLayout {...props} />;
|
|
|
|
layout = <PageEmptyLayout {...props} />;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|