feat: sidebar button config (#5818)
* feat: 新增 PreferenceCheckboxItem 组件 * feat(preferences): 添加侧边栏按钮配置功能 * feat: 新增按钮点击事件触发功能 * feat(SidebarPreferences): 新增侧边栏折叠按钮与固定按钮配置 * feat(ui): 新增侧边栏固定按钮及配置选项 * fix(test): 修正侧边栏配置项缺失问题
This commit is contained in:
@@ -65,9 +65,14 @@ interface Props {
|
||||
show?: boolean;
|
||||
/**
|
||||
* 显示折叠按钮
|
||||
* @default false
|
||||
* @default true
|
||||
*/
|
||||
showCollapseButton?: boolean;
|
||||
/**
|
||||
* 显示固定按钮
|
||||
* @default true
|
||||
*/
|
||||
showFixedButton?: boolean;
|
||||
/**
|
||||
* 主题
|
||||
*/
|
||||
@@ -95,6 +100,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
paddingTop: 0,
|
||||
show: true,
|
||||
showCollapseButton: true,
|
||||
showFixedButton: true,
|
||||
zIndex: 0,
|
||||
});
|
||||
|
||||
@@ -267,7 +273,7 @@ function handleMouseleave() {
|
||||
@mouseleave="handleMouseleave"
|
||||
>
|
||||
<SidebarFixedButton
|
||||
v-if="!collapse && !isSidebarMixed"
|
||||
v-if="!collapse && !isSidebarMixed && showFixedButton"
|
||||
v-model:expand-on-hover="expandOnHover"
|
||||
/>
|
||||
<div v-if="slots.logo" :style="headerStyle">
|
||||
|
Reference in New Issue
Block a user