Skip to content

Commit

Permalink
feat(style): 使用Antd组件提供的切换主题功能 (#3051)
Browse files Browse the repository at this point in the history
* perf(style): 使用antd4的暗黑主题

* refactor: 抽离切换暗黑主题模式
  • Loading branch information
wangjue666 authored Sep 21, 2023
1 parent a6b65b5 commit dbdd811
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 8,303 deletions.
6 changes: 5 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ConfigProvider :locale="getAntdLocale">
<ConfigProvider :locale="getAntdLocale" :theme="isDark ? darkTheme : {}">
<AppProvider>
<RouterView />
</AppProvider>
Expand All @@ -11,11 +11,15 @@
import { AppProvider } from '@/components/Application';
import { useTitle } from '@/hooks/web/useTitle';
import { useLocale } from '@/locales/useLocale';
import 'dayjs/locale/zh-cn';
import { useDarkModeTheme } from '@/hooks/setting/useDarkModeTheme';
// support Multi-language
const { getAntdLocale } = useLocale();
const { isDark, darkTheme } = useDarkModeTheme();
// Listening to page changes and dynamically changing site titles
useTitle();
</script>
2 changes: 1 addition & 1 deletion src/components/Modal/src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
&-close {
width: auto !important;
outline: none;
background: #fff !important;
background: transparent !important;
font-weight: normal;
}

Expand Down
Loading

0 comments on commit dbdd811

Please sign in to comment.