✨(all): 发布 1.1.8
更新文档
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@layui/layui-vue",
|
||||
"version": "1.1.7",
|
||||
"version": "1.1.8",
|
||||
"author": "就眠儀式",
|
||||
"license": "MIT",
|
||||
"description": "a component library for Vue 3 base on layui-vue",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user