|
|
|
@ -13,6 +13,7 @@ import UserLayout from "./UserLayout";
|
|
|
|
|
import { IRouterProps, RouterContext } from "./RouterContext";
|
|
|
|
|
import { layoutConfig } from "@/layouts/config";
|
|
|
|
|
import stores from "@/store";
|
|
|
|
|
import { Storage } from "@/utils";
|
|
|
|
|
import "moment/locale/zh-cn";
|
|
|
|
|
import "antd/dist/antd.variable.min.css";
|
|
|
|
|
|
|
|
|
@ -38,6 +39,16 @@ const Layout = ({ children, location, route, history, match }: IRouteComponentPr
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// API.SettingService.initSystemParam();
|
|
|
|
|
const { themeFontSize } = Storage.local.get("theme-themeInfo") || { themeFontSize: "12" };
|
|
|
|
|
document.documentElement.style.setProperty("--data-size", themeFontSize + "px");
|
|
|
|
|
const checkData = () => {
|
|
|
|
|
const { themeFontSize } = Storage.local.get("theme-themeInfo") || { themeFontSize: "12" };
|
|
|
|
|
document.documentElement.style.setProperty("--data-size", themeFontSize + "px");
|
|
|
|
|
};
|
|
|
|
|
window.addEventListener("storage", checkData);
|
|
|
|
|
return () => {
|
|
|
|
|
window.removeEventListener("storage", checkData);
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
let layout;
|
|
|
|
|