1+ <template >
2+ <component :is =" 'style'" v-if =" shouldHide" >
3+ aside, #logo-sidebar, .af-sidebar-container, [aria-label="Sidebar"] {
4+ display: none !important;
5+ width: 0 !important;
6+ }
7+
8+ button[aria-controls="logo-sidebar"], .af-logo-title-wrapper {
9+ display: none !important;
10+ }
11+
12+ .sm\:ml-64, .md\:ml-64, .lg\:ml-64, div[class*="ml-64"] {
13+ margin-left: 0 !important;
14+ width: 100% !important;
15+ max-width: 100% !important;
16+ }
17+
18+ .af-header, nav .flex {
19+ justify-content: flex-end !important;
20+ }
21+
22+ .af-header > div:last-child, nav > div > div:last-child {
23+ margin-left: auto !important;
24+ }
25+
26+ nav div.flex.items-center.justify-start {
27+ display: none !important;
28+ }
29+ </component >
30+ </template >
31+
32+ <script setup>
33+ import { computed } from ' vue' ;
34+ import { useCoreStore } from ' @/stores/core' ;
35+
36+ const coreStore = useCoreStore ();
37+
38+ const shouldHide = computed (() => {
39+ const menu = coreStore .menu || [];
40+ if (! menu) return false ;
41+ if (menu .length === 0 ) return true ;
42+
43+ const hasRealItems = menu .some (item => item .path || item .resourceId || (item .children && item .children .length > 0 ));
44+ return ! hasRealItems;
45+ });
46+ </script >
0 commit comments