From d819249ebf4fc0f95d754bb7a4db6c87f371b644 Mon Sep 17 00:00:00 2001 From: Timi Date: Fri, 3 Apr 2026 21:17:14 +0800 Subject: [PATCH] fix FileExplorer style --- src/layout/MainLayout.vue | 33 +++++++++++++++++++++++++---- src/pages/file/FileExplorerList.vue | 20 +++++++++++------ src/pages/file/FileExplorerPage.vue | 23 +++++++++----------- 3 files changed, 53 insertions(+), 23 deletions(-) diff --git a/src/layout/MainLayout.vue b/src/layout/MainLayout.vue index 2792168..b72fea5 100644 --- a/src/layout/MainLayout.vue +++ b/src/layout/MainLayout.vue @@ -27,7 +27,7 @@ :disabled="!tabBarStore.isShowing" @change="onChangeTab" > - + @@ -144,10 +144,11 @@ const bodyHeight = computed(() => { diff --git a/src/pages/file/FileExplorerPage.vue b/src/pages/file/FileExplorerPage.vue index de7a709..ae3a418 100644 --- a/src/pages/file/FileExplorerPage.vue +++ b/src/pages/file/FileExplorerPage.vue @@ -1,15 +1,5 @@ @@ -57,7 +46,7 @@ const emit = defineEmits<{ const route = useRoute(); const router = useRouter(); const navBarStore = useNavBarStore(); -const navBarRightOwner = "file-explorer-page"; +const navBarRightOwner = `file-explorer-page-${Math.random().toString(36).slice(2)}`; const fileTree: FileEntry[] = [ { @@ -184,15 +173,21 @@ const navBarRightRenderer = defineComponent({ name: "file-explorer-nav-right", setup() { const buttonComponent = resolveComponent("t-button"); + const iconComponent = resolveComponent("t-icon"); return () => h(buttonComponent, { size: "small", variant: "text", theme: "primary", class: "nav-switch", + shape: "square", + "aria-label": displayModeActionText.value, onClick: toggleDisplayMode }, { - default: () => displayModeActionText.value + icon: () => h(iconComponent, { + name: displayMode.value === "list" ? "grid-view" : "view-list", + size: "1.5rem" + }) }); } }); @@ -333,6 +328,8 @@ async function syncPath(nextSegments: string[]): Promise { .nav-switch { padding: 0; + width: 2rem; + height: 2rem; } .go-up {