File tree Expand file tree Collapse file tree
adminforth/spa/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9090 </svg >
9191 </button >
9292
93- <ul :id =" `dropdown-example${i}`" role =" none" class =" af-sidebar-dropdown pt-1 space-y-1" :class =" { 'hidden': !opened.includes(i) }" >
94- <template v-for =" (child , j ) in item .children " :key =" ` menu-${i }-${j } ` " >
95- <li class =" af-sidebar-menu-link" >
96- <MenuLink :item =" child" isChild =" true" @click =" $emit('hideSidebar')" />
93+ <transition name =" slow-drop" >
94+ <ul v-show =" opened.includes(i)" :id =" `dropdown-example${i}`" role =" none" class =" af-sidebar-dropdown pt-1 space-y-1 overflow-hidden" >
95+ <template v-for =" (child , j ) in item .children " :key =" ` menu-${i }-${j } ` " >
96+ <li class =" af-sidebar-menu-link" >
97+ <MenuLink :item =" child" isChild =" true" @click =" $emit('hideSidebar')" />
9798 </li >
98- </template >
99- </ul >
99+ </template >
100+ </ul >
101+ </transition >
100102 </li >
101103 <li v-else class =" af-sidebar-menu-link" >
102104 <MenuLink :item =" item" @click =" $emit('hideSidebar')" />
292294 background-color : rgba (75 , 85 , 99 , 0.4 );
293295 }
294296
297+ /* Custom animation for dropdown */
298+ .slow-drop-enter-active ,
299+ .slow-drop-leave-active {
300+ overflow : hidden ;
301+ transition : opacity 0.2s ease , transform 0.2s ease ;
302+ }
303+
304+ .slow-drop-enter-from ,
305+ .slow-drop-leave-to {
306+ opacity : 0 ;
307+ transform : translateY (-4px );
308+ }
309+
310+ .slow-drop-enter-to ,
311+ .slow-drop-leave-from {
312+ opacity : 1 ;
313+ transform : translateY (0 );
314+ }
315+
295316 /* For browsers that support overlay scrollbars natively */
296317 @supports (overflow : overlay ) {
297318 .sidebar-scroll {
You can’t perform that action at this time.
0 commit comments