Trim layout widgets runtime

This commit is contained in:
2026-06-09 18:01:50 +08:00
parent 31389dcfd2
commit 75f7cacc17
8 changed files with 68 additions and 133 deletions
+1 -7
View File
@@ -33,9 +33,6 @@ const AuthenticationLoginExpiredModal = defineAsyncComponent(() =>
const UserDropdown = defineAsyncComponent(() =>
import('@vben/layouts/es/user-dropdown').then((module) => module.UserDropdown),
);
const LockScreen = defineAsyncComponent(() =>
import('@vben/layouts/es/lock-screen').then((module) => module.LockScreen),
);
const NotificationPopup = defineAsyncComponent(
() => import('#/components/notification/NotificationPopup.vue'),
);
@@ -275,7 +272,7 @@ watch(
</script>
<template>
<BasicLayout @clear-preferences-and-logout="handleLogout">
<BasicLayout>
<template #user-dropdown>
<UserDropdown
:avatar
@@ -336,8 +333,5 @@ watch(
<LoginForm />
</AuthenticationLoginExpiredModal>
</template>
<template #lock-screen>
<LockScreen :avatar @to-login="handleLogout" />
</template>
</BasicLayout>
</template>
+21
View File
@@ -12,11 +12,20 @@ export const overridesPreferences = defineOverridesPreferences({
app: {
name: import.meta.env.VITE_APP_TITLE,
enableRefreshToken: true,
enableCheckUpdates: false,
enablePreferences: false,
accessMode: 'mixed',
authPageLayout: 'panel-center',
defaultHomePath: '/control-center',
layout: 'header-sidebar-nav',
},
shortcutKeys: {
enable: false,
globalLockScreen: false,
globalLogout: true,
globalPreferences: false,
globalSearch: false,
},
theme: {
mode: 'light',
},
@@ -37,4 +46,16 @@ export const overridesPreferences = defineOverridesPreferences({
fit: 'contain',
source: Logo,
},
widget: {
fullscreen: false,
globalSearch: false,
languageToggle: false,
lockScreen: false,
notification: true,
refresh: false,
sidebarBranding: true,
sidebarToggle: true,
themeToggle: true,
timezone: false,
},
});