feat: preference button supports automatic positioning (#4243)

This commit is contained in:
Vben
2024-08-26 23:17:27 +08:00
committed by GitHub
parent dc5cfab319
commit d2f3a9d04f
11 changed files with 57 additions and 17 deletions

View File

@@ -40,6 +40,7 @@ const {
isMobile,
isSideMixedNav,
layout,
preferencesButtonPosition,
sidebarCollapsed,
theme,
} = usePreferences();
@@ -326,12 +327,7 @@ const headerSlots = computed(() => {
<slot v-if="lockStore.isLockScreen" name="lock-screen"></slot>
</Transition>
<template
v-if="
preferences.app.enablePreferences &&
preferences.app.preferencesButtonPosition === 'fixed'
"
>
<template v-if="preferencesButtonPosition.fixed">
<Preferences
class="z-100 fixed bottom-20 right-0"
@clear-preferences-and-logout="clearPreferencesAndLogout"