📝(component): 更新日志

This commit is contained in:
就眠儀式
2022-06-29 10:09:21 +08:00
parent fb16960f28
commit 36323688bb
5 changed files with 121 additions and 33 deletions

View File

@@ -13,7 +13,7 @@ import {
enable as enableDarkMode,
disable as disableDarkMode,
auto as followSystemColorScheme,
setFetchMethod
setFetchMethod,
} from "@umijs/ssr-darkreader";
export interface LayConfigProviderProps {
@@ -72,7 +72,7 @@ const changeTheme = (theme: string) => {
};
Object.assign(defaultPartial, props.darkPartial);
if (theme === "dark") {
if(window){
if (window) {
setFetchMethod(window.fetch);
}
enableDarkMode(defaultPartial, defaultFixes);