Skip to content

Commit c8e93d4

Browse files
committed
fix: 修复窗口缩小时界面溢出与原生滚动条 fixes SPlayer-Dev#149
1 parent 41acabe commit c8e93d4

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/components/layout/NavHeader.vue‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ const onMenuSelect = (key: string): void => {
8080
>
8181
<template #icon><IconLucideChevronRight /></template>
8282
</SButton>
83-
<NavSearch />
8483
<SButton
8584
v-if="update.hasUpdate"
8685
class="app-no-drag"
@@ -94,8 +93,10 @@ const onMenuSelect = (key: string): void => {
9493
<template #icon><IconLucideCircleArrowUp /></template>
9594
</SButton>
9695
</div>
97-
<!-- 中间 -->
98-
<div class="flex-1 h-full" />
96+
<!-- 中间:搜索框,窄窗口下可收缩 -->
97+
<div class="flex-1 min-w-0 mx-3">
98+
<NavSearch />
99+
</div>
99100
<!-- 右侧 -->
100101
<div class="flex items-center gap-3 shrink-0">
101102
<NavUser />

‎src/components/layout/NavSearch.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ onMounted(() => {
277277
<div
278278
role="button"
279279
:aria-label="t('nav.searchPlaceholder')"
280-
class="app-no-drag w-60 h-10 px-4 cursor-pointer flex items-center gap-2 rounded-full border border-solid bg-on-surface/3 border-on-surface/15 hover:bg-on-surface/10 hover:border-on-surface/25 transition-colors duration-250 select-none"
280+
class="app-no-drag w-full max-w-60 min-w-0 h-10 px-4 cursor-pointer flex items-center gap-2 rounded-full border border-solid bg-on-surface/3 border-on-surface/15 hover:bg-on-surface/10 hover:border-on-surface/25 transition-colors duration-250 select-none"
281281
@click="dialogOpen = true"
282282
@contextmenu.prevent="dialogOpen = true"
283283
@mousedown.prevent

‎src/layouts/MainLayout.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const playerBarInnerClass = computed(() => {
7575
<template>
7676
<!-- 主界面 -->
7777
<div
78-
class="h-screen flex bg-app text-on-surface transition-[transform,opacity] duration-500 ease-[cubic-bezier(0.7,0,0.3,1)] origin-center"
78+
class="h-screen flex overflow-hidden bg-app text-on-surface transition-[transform,opacity] duration-500 ease-[cubic-bezier(0.7,0,0.3,1)] origin-center"
7979
:class="isPlayerExpanded ? 'scale-95 opacity-0 pointer-events-none' : ''"
8080
>
8181
<!-- 侧边栏 -->

‎src/styles/global.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ html[data-appearance-style="image"] [role="alertdialog"] .bg-field {
104104
/* 滚动条 */
105105
::-webkit-scrollbar {
106106
width: 6px;
107+
height: 6px;
107108
}
108109

109110
::-webkit-scrollbar-track {

0 commit comments

Comments
 (0)