feat: 恢复暗黑主题 (#2947)

* feat: 恢复暗黑主题

* fix: 修复danger btn暗黑样式优先级
This commit is contained in:
invalid w
2023-08-07 18:51:30 +08:00
committed by GitHub
parent 0bd98b3c27
commit eea414e04b
5 changed files with 9685 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ import appLogo from './src/AppLogo.vue';
import appProvider from './src/AppProvider.vue';
import appSearch from './src/search/AppSearch.vue';
import appLocalePicker from './src/AppLocalePicker.vue';
// import appDarkModeToggle from './src/AppDarkModeToggle.vue';
import appDarkModeToggle from './src/AppDarkModeToggle.vue';
export { useAppProviderContext } from './src/useAppContext';
@@ -12,4 +12,4 @@ export const AppLogo = withInstall(appLogo);
export const AppProvider = withInstall(appProvider);
export const AppSearch = withInstall(appSearch);
export const AppLocalePicker = withInstall(appLocalePicker);
// export const AppDarkModeToggle = withInstall(appDarkModeToggle);
export const AppDarkModeToggle = withInstall(appDarkModeToggle);

9678
src/design/dark.less Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,7 @@
@import 'ant/index.less';
@import './theme.less';
@import './entry.css';
@import './dark.less';
input:-webkit-autofill {
box-shadow: 0 0 0 1000px white inset !important;

View File

@@ -10,7 +10,7 @@ import {
InputNumberItem,
} from './components';
// import { AppDarkModeToggle } from '/@/components/Application';
import { AppDarkModeToggle } from '/@/components/Application';
import { MenuTypeEnum, TriggerEnum } from '/@/enums/menuEnum';
@@ -404,7 +404,7 @@ export default defineComponent({
class="setting-drawer"
>
{unref(getShowDarkModeToggle) && <Divider>{() => t('layout.setting.darkMode')}</Divider>}
{/* {unref(getShowDarkModeToggle) && <AppDarkModeToggle class="mx-auto" />} */}
{unref(getShowDarkModeToggle) && <AppDarkModeToggle class="mx-auto" />}
<Divider>{() => t('layout.setting.navMode')}</Divider>
{renderSidebar()}
{/* <Divider>{() => t('layout.setting.sysTheme')}</Divider>

View File

@@ -1,7 +1,7 @@
<template>
<div :class="prefixCls" class="relative w-full h-full px-4">
<div class="flex items-center absolute right-4 top-4">
<!-- <AppDarkModeToggle class="enter-x mr-2" v-if="!sessionTimeout" /> -->
<AppDarkModeToggle class="enter-x mr-2" v-if="!sessionTimeout" />
<AppLocalePicker
class="text-white enter-x xl:text-gray-600"
:show-text="false"
@@ -49,7 +49,7 @@
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { AppLogo, AppLocalePicker } from '/@/components/Application';
import { AppLogo, AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
import LoginForm from './LoginForm.vue';
import ForgetPasswordForm from './ForgetPasswordForm.vue';
import RegisterForm from './RegisterForm.vue';