From 8146858b967a14503f02ed7c157a04cd5652e8a1 Mon Sep 17 00:00:00 2001 From: Soybean Date: Sun, 13 Jul 2025 13:43:25 +0800 Subject: [PATCH] optimize(projects): optimize theme drawer width --- src/layouts/modules/theme-drawer/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layouts/modules/theme-drawer/index.vue b/src/layouts/modules/theme-drawer/index.vue index 5fec02aa..b963ba18 100644 --- a/src/layouts/modules/theme-drawer/index.vue +++ b/src/layouts/modules/theme-drawer/index.vue @@ -15,12 +15,14 @@ const appStore = useAppStore(); const activeTab = ref('appearance'); const drawerWidth = computed(() => { + const width = 400; + // On mobile devices, use 90% of viewport width with a maximum of 400px if (appStore.isMobile) { - return 'min(90vw, 400px)'; + return `min(90vw, ${width}px)`; } - return 460; + return width; });