File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { computed, ref } from "vue";
7
7
8
8
const router = useRouter ();
9
9
const route = useRoute ();
10
- const selectedId = ref (0 );
11
10
12
11
const expanded = useLocalStorage (" vue-forge-drawer-expanded" , true );
13
12
const expandedIcon = computed (() =>
@@ -43,7 +42,7 @@ const items = computed(() =>
43
42
action : () => (expanded .value = ! expanded .value ),
44
43
},
45
44
},
46
- ].map ((item , index ) => ({
45
+ ].map ((item ) => ({
47
46
... item ,
48
47
selected: route .path === item .data .path ,
49
48
}))
@@ -52,7 +51,6 @@ const items = computed(() =>
52
51
function onSelect({ itemIndex }: { itemIndex: number }) {
53
52
const item = items .value [itemIndex ];
54
53
if (! item ) return ;
55
- selectedId .value = itemIndex ;
56
54
if (item .data .path ) router .push (item .data .path );
57
55
if (typeof item .data .action === " function" ) item .data .action ();
58
56
}
You can’t perform that action at this time.
0 commit comments