fix: 修复 container 组件 fluid 属性的类型推断警告

This commit is contained in:
就眠儀式 2022-04-07 21:10:12 +08:00
parent 6fe947ef79
commit f1832eaa1f
2 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,7 @@ import { computed } from "vue";
import "./index.less"; import "./index.less";
export interface LayContainerProps { export interface LayContainerProps {
fluid?: boolean; fluid?: boolean | string;
} }
const props = withDefaults(defineProps<LayContainerProps>(), { const props = withDefaults(defineProps<LayContainerProps>(), {

View File

@ -42,13 +42,12 @@ const changeLocales = (lang: string, locales: any, merge: boolean) => {
}; };
const changeTheme = (theme: string) => { const changeTheme = (theme: string) => {
const defaultPartial: Partial<Theme> = { const defaultPartial: Partial<Theme> = {
mode: 1, mode: 1,
brightness: 100, brightness: 100,
contrast: 90, contrast: 90,
sepia: 0, sepia: 0,
grayscale: 0 grayscale: 0,
}; };
const defaultFixes: DynamicThemeFix = { const defaultFixes: DynamicThemeFix = {
@ -59,7 +58,7 @@ const changeTheme = (theme: string) => {
ignoreInlineStyle: [ ignoreInlineStyle: [
".layui-colorpicker-trigger-span", ".layui-colorpicker-trigger-span",
"div.layui-color-picker *", "div.layui-color-picker *",
] ],
}; };
Object.assign(defaultPartial, props.darkPartial); Object.assign(defaultPartial, props.darkPartial);