File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/layouts/modules/theme-drawer Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2- import { ref } from ' vue' ;
2+ import { computed , ref } from ' vue' ;
33import { useAppStore } from ' @/store/modules/app' ;
44import { $t } from ' @/locales' ;
55import AppearanceSettings from ' ./modules/appearance/index.vue' ;
@@ -13,10 +13,19 @@ defineOptions({
1313
1414const appStore = useAppStore ();
1515const activeTab = ref (' appearance' );
16+
17+ const drawerWidth = computed (() => {
18+ // On mobile devices, use 90% of viewport width with a maximum of 400px
19+ if (appStore .isMobile ) {
20+ return ' min(90vw, 400px)' ;
21+ }
22+
23+ return 460 ;
24+ });
1625 </script >
1726
1827<template >
19- <NDrawer v-model:show =" appStore.themeDrawerVisible" display-directive =" show" :width =" 460 " >
28+ <NDrawer v-model:show =" appStore.themeDrawerVisible" display-directive =" show" :width =" drawerWidth " >
2029 <NDrawerContent :title =" $t('theme.themeDrawerTitle')" :native-scrollbar =" false" closable >
2130 <NTabs v-model:value =" activeTab" type =" segment" size =" medium" class =" mb-16px" >
2231 <NTab name =" appearance" :tab =" $t('theme.tabs.appearance')" ></NTab >
You can’t perform that action at this time.
0 commit comments