Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added header height props #5367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/@core/preferences/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ interface FooterPreferences {
interface HeaderPreferences {
/** 顶栏是否启用 */
enable: boolean;
/** header高度 */
height: number;
/** 顶栏是否隐藏,css-隐藏 */
hidden: boolean;
/** 顶栏菜单位置 */
Expand Down
3 changes: 2 additions & 1 deletion packages/effects/layouts/src/basic/layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const headerSlots = computed(() => {
:content-compact="preferences.app.contentCompact"
:footer-enable="preferences.footer.enable"
:footer-fixed="preferences.footer.fixed"
:header-height="preferences.header.height"
:header-hidden="preferences.header.hidden"
:header-mode="preferences.header.mode"
:header-theme="headerTheme"
Expand Down Expand Up @@ -283,9 +284,9 @@ const headerSlots = computed(() => {
:menus="wrapperMenus(mixHeaderMenus, false)"
:rounded="isMenuRounded"
:theme="sidebarTheme"
@default-select="handleDefaultSelect"
@enter="handleMenuMouseEnter"
@select="handleMixedMenuSelect"
@default-select="handleDefaultSelect"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Confirmed: Unrelated change to header height feature

The @default-select event handler is part of the menu navigation system and has no functional relationship with the header height feature. This change should be addressed in a separate PR focused on menu-related modifications.

🔗 Analysis chain

Unrelated change detected

The @default-select event handler appears to be re-added without any functional changes. This seems unrelated to the header height feature.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if this event handler existed before
git log -S '@default-select' --pickaxe-regex

Length of output: 0


Script:

#!/bin/bash
# Search for all occurrences of default-select
rg -l '@default-select|@emit.*default-select|\$emit.*default-select' --type vue

# Find handleDefaultSelect implementation
ast-grep --pattern 'handleDefaultSelect($$$) {
  $$$
}'

Length of output: 167


Script:

#!/bin/bash
# Search for all occurrences of default-select and handler
rg -l 'default-select|handleDefaultSelect'

# Find the implementation with more context
ast-grep --pattern 'methods: {
  $$$
  handleDefaultSelect($$$) {
    $$$
  }
  $$$
}'

Length of output: 237


Script:

#!/bin/bash
# Get context for both files
rg 'default-select|handleDefaultSelect' -C 5 packages/effects/layouts/src/basic/layout.vue packages/effects/layouts/src/basic/menu/use-extra-menu.ts

# Look for header-related code near these occurrences
rg 'header|height' -C 5 packages/effects/layouts/src/basic/layout.vue

Length of output: 7194

/>
</template>
<!-- 侧边额外区域 -->
Expand Down
Loading