fix: 修复 container 组件 fluid 属性的类型推断警告
This commit is contained in:
parent
6fe947ef79
commit
f1832eaa1f
@ -9,7 +9,7 @@ import { computed } from "vue";
|
||||
import "./index.less";
|
||||
|
||||
export interface LayContainerProps {
|
||||
fluid?: boolean;
|
||||
fluid?: boolean | string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<LayContainerProps>(), {
|
||||
|
@ -42,13 +42,12 @@ const changeLocales = (lang: string, locales: any, merge: boolean) => {
|
||||
};
|
||||
|
||||
const changeTheme = (theme: string) => {
|
||||
|
||||
const defaultPartial: Partial<Theme> = {
|
||||
mode: 1,
|
||||
brightness: 100,
|
||||
contrast: 90,
|
||||
sepia: 0,
|
||||
grayscale: 0
|
||||
grayscale: 0,
|
||||
};
|
||||
|
||||
const defaultFixes: DynamicThemeFix = {
|
||||
@ -59,16 +58,16 @@ const changeTheme = (theme: string) => {
|
||||
ignoreInlineStyle: [
|
||||
".layui-colorpicker-trigger-span",
|
||||
"div.layui-color-picker *",
|
||||
]
|
||||
],
|
||||
};
|
||||
|
||||
Object.assign(defaultPartial, props.darkPartial);
|
||||
|
||||
if (theme === "dark") {
|
||||
enableDarkMode(defaultPartial, defaultFixes);
|
||||
} else if(theme === "light"){
|
||||
} else if (theme === "light") {
|
||||
disableDarkMode();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const changeThemeVariable = (vars: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user