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