(all): 发布 1.1.8

更新文档
This commit is contained in:
就眠儀式
2022-06-20 10:30:43 +08:00
parent 615cb5ba7c
commit 0010259ef8
3 changed files with 11 additions and 8 deletions

View File

@@ -12,10 +12,9 @@ import {
DynamicThemeFix,
enable as enableDarkMode,
disable as disableDarkMode,
auto as followSystemColorScheme,
} from "darkreader";
const { locale, setLocaleMessage, mergeLocaleMessage } = useI18n();
export interface LayConfigProviderProps {
locale?: string;
locales?: [];
@@ -29,6 +28,10 @@ const props = withDefaults(defineProps<LayConfigProviderProps>(), {
theme: "light",
});
const { locale, setLocaleMessage, mergeLocaleMessage } = useI18n();
const ignoreInlineStyle = [".layui-colorpicker-trigger-span","div.layui-color-picker *"];
const changeLocale = (lang: string) => {
locale.value = lang;
};
@@ -55,16 +58,15 @@ const changeTheme = (theme: string) => {
invert: [],
ignoreImageAnalysis: [],
disableStyleSheetsProxy: false,
ignoreInlineStyle: [
".layui-colorpicker-trigger-span",
"div.layui-color-picker *",
],
ignoreInlineStyle: ignoreInlineStyle,
};
Object.assign(defaultPartial, props.darkPartial);
if (theme === "dark") {
enableDarkMode(defaultPartial, defaultFixes);
} else if (theme === "light") {
disableDarkMode();
} else if (theme === "auto") {
followSystemColorScheme(defaultPartial, defaultFixes);
}
};