This commit is contained in:
parent
7a128ef148
commit
9d5e43d0fc
@ -83,6 +83,10 @@ const menuExpanded = () => {
|
||||
isExpended.value = !isExpended.value
|
||||
}
|
||||
|
||||
const menuClose = () => {
|
||||
isExpended.value = false
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -113,7 +117,9 @@ const menuExpanded = () => {
|
||||
>
|
||||
<nav-bar-entry-item v-for="item in entry" :key="item.title"
|
||||
:entry="item.entry" :icon="item.icon"
|
||||
:title="item.title" :to="item.to"/>
|
||||
:title="item.title" :to="item.to"
|
||||
@on-go="menuClose"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 快速跳转小组件 -->
|
||||
|
@ -7,6 +7,10 @@ type Entry = {
|
||||
to: string,
|
||||
}
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'onGo'): void
|
||||
}>();
|
||||
|
||||
defineProps<{
|
||||
title: string
|
||||
icon: string[]
|
||||
@ -20,6 +24,7 @@ const onClick = (to: string | undefined, url: boolean) => {
|
||||
|
||||
if (url)
|
||||
window.open(to)
|
||||
emit('onGo')
|
||||
router.push({name: to})
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user