feat(projects): add switch for customize darkmode transition

This commit is contained in:
Soybean
2023-06-20 22:33:22 +08:00
parent d3ebe95076
commit 6e0cce4d49
7 changed files with 27 additions and 2 deletions

View File

@ -1,6 +1,11 @@
<template>
<hover-container class="w-40px" :inverted="theme.header.inverted" tooltip-content="主题模式">
<dark-mode-switch :dark="theme.darkMode" class="wh-full" @update:dark="theme.setDarkMode" />
<dark-mode-switch
:dark="theme.darkMode"
:customize-transition="theme.isCustomizeDarkModeTransition"
class="wh-full"
@update:dark="theme.setDarkMode"
/>
</hover-container>
</template>

View File

@ -21,6 +21,16 @@
</template>
</n-switch>
</setting-menu>
<setting-menu label="自定义暗黑主题动画过渡">
<n-switch :value="theme.isCustomizeDarkModeTransition" @update:value="theme.setIsCustomizeDarkModeTransition">
<template #checked>
<icon-ic-baseline-do-not-disturb class="text-14px text-white" />
</template>
<template #unchecked>
<icon-ic-round-hdr-auto class="text-14px text-white" />
</template>
</n-switch>
</setting-menu>
<setting-menu label="侧边栏深色">
<n-switch :value="theme.sider.inverted" @update:value="theme.setSiderInverted" />
</setting-menu>