mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-24 03:29:03 +08:00
feat: resolve type error
This commit is contained in:
parent
f7fb462479
commit
4d28014548
|
@ -97,6 +97,7 @@ const initStyleConfig = () => {
|
||||||
const styleConfig = STYLE_CONFIG;
|
const styleConfig = STYLE_CONFIG;
|
||||||
for (const key in styleConfig) {
|
for (const key in styleConfig) {
|
||||||
if (Object.prototype.hasOwnProperty.call(styleConfig, key)) {
|
if (Object.prototype.hasOwnProperty.call(styleConfig, key)) {
|
||||||
|
// @ts-ignore
|
||||||
styleConfig[key] = settingStore[key];
|
styleConfig[key] = settingStore[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +124,7 @@ const getModeIcon = (mode: string) => {
|
||||||
dark: SettingDarkIcon,
|
dark: SettingDarkIcon,
|
||||||
auto: SettingAutoIcon,
|
auto: SettingAutoIcon,
|
||||||
};
|
};
|
||||||
return modeIconMap[mode];
|
return modeIconMap[mode as 'light' | 'dark' | 'auto'];
|
||||||
};
|
};
|
||||||
|
|
||||||
const getLayoutIcon = (mode: string) => {
|
const getLayoutIcon = (mode: string) => {
|
||||||
|
@ -132,7 +133,7 @@ const getLayoutIcon = (mode: string) => {
|
||||||
top: LayoutTopIcon,
|
top: LayoutTopIcon,
|
||||||
mix: LayoutMixIcon,
|
mix: LayoutMixIcon,
|
||||||
};
|
};
|
||||||
return layoutIconMap[mode];
|
return layoutIconMap[mode as 'side' | 'top' | 'mix'];
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCloseDrawer = () => {
|
const handleCloseDrawer = () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user