-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(ConfigProvider): 配置antdv主题色, 使其与modifyVars配置一致 (#3219)
* perf(ConfigProvider): 配置antdv主题, 使其与modifyVars配置一致 * fix(dark): 修正颜色写法 * fix(dark): 修正app-content-background-color深色颜色 * style(BasicTable): row striped style add important --------- Co-authored-by: 苗大 <caoshengmiao@hypergryph.com>
- Loading branch information
Showing
3 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
<template> | ||
<ConfigProvider :locale="getAntdLocale" :theme="isDark ? darkTheme : {}"> | ||
<ConfigProvider :locale="getAntdLocale" :theme="themeConfig"> | ||
<AppProvider> | ||
<RouterView /> | ||
</AppProvider> | ||
</ConfigProvider> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ConfigProvider } from 'ant-design-vue'; | ||
import { AppProvider } from '@/components/Application'; | ||
import { useTitle } from '@/hooks/web/useTitle'; | ||
import { useLocale } from '@/locales/useLocale'; | ||
import { ConfigProvider } from 'ant-design-vue'; | ||
import 'dayjs/locale/zh-cn'; | ||
import { useDarkModeTheme } from '@/hooks/setting/useDarkModeTheme'; | ||
import 'dayjs/locale/zh-cn'; | ||
import { computed } from 'vue'; | ||
// support Multi-language | ||
const { getAntdLocale } = useLocale(); | ||
const { isDark, darkTheme } = useDarkModeTheme(); | ||
const themeConfig = computed(() => | ||
Object.assign( | ||
{ | ||
token: { | ||
colorPrimary: '#0960bd', | ||
colorSuccess: '#55D187', | ||
colorWarning: '#EFBD47', | ||
colorError: '#ED6F6F', | ||
colorInfo: '#0960bd', | ||
}, | ||
}, | ||
isDark.value ? darkTheme : {}, | ||
), | ||
); | ||
// Listening to page changes and dynamically changing site titles | ||
useTitle(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters