feat: sidebar button config (#5818)

* feat: 新增 PreferenceCheckboxItem 组件

* feat(preferences): 添加侧边栏按钮配置功能

* feat: 新增按钮点击事件触发功能

* feat(SidebarPreferences): 新增侧边栏折叠按钮与固定按钮配置

* feat(ui): 新增侧边栏固定按钮及配置选项

* fix(test): 修正侧边栏配置项缺失问题
This commit is contained in:
Jin Mao
2025-03-31 10:17:42 +08:00
committed by YunaiV
parent ed2da6315e
commit a61d9003dd
11 changed files with 138 additions and 6 deletions

View File

@@ -93,8 +93,9 @@ const sidebarCollapsedShowTitle = defineModel<boolean>(
const sidebarAutoActivateChild = defineModel<boolean>(
'sidebarAutoActivateChild',
);
const SidebarExpandOnHover = defineModel<boolean>('sidebarExpandOnHover');
const sidebarExpandOnHover = defineModel<boolean>('sidebarExpandOnHover');
const sidebarCollapsedButton = defineModel<boolean>('sidebarCollapsedButton');
const sidebarFixedButton = defineModel<boolean>('sidebarFixedButton');
const headerEnable = defineModel<boolean>('headerEnable');
const headerMode = defineModel<LayoutHeaderModeType>('headerMode');
const headerMenuAlign =
@@ -317,8 +318,10 @@ async function handleReset() {
v-model:sidebar-collapsed="sidebarCollapsed"
v-model:sidebar-collapsed-show-title="sidebarCollapsedShowTitle"
v-model:sidebar-enable="sidebarEnable"
v-model:sidebar-expand-on-hover="SidebarExpandOnHover"
v-model:sidebar-expand-on-hover="sidebarExpandOnHover"
v-model:sidebar-width="sidebarWidth"
v-model:sidebar-collapsed-button="sidebarCollapsedButton"
v-model:sidebar-fixed-button="sidebarFixedButton"
:current-layout="appLayout"
:disabled="!isSideMode"
/>