36 lines
709 B
Plaintext
36 lines
709 B
Plaintext
<script setup lang="ts">
|
|
const { push } = useRouter()
|
|
|
|
const route = useRoute()
|
|
|
|
const menus = computed(() => {
|
|
return route.matched
|
|
.map((i: any) => {
|
|
i.title = i.meta.title
|
|
return i
|
|
})
|
|
.filter((i) => i.title)
|
|
})
|
|
|
|
function handleClick(menu: any) {
|
|
push(menu.path)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="absolute text-15px top-18px left-0 font-600 z-99">
|
|
<span class="cursor-pointer item" v-for="(item, idx) in menus" :key="item.path">
|
|
<span @click="handleClick(item)">{{ item.title }}</span>
|
|
<span class="mx8px" v-if="idx < menus.length - 1">></span>
|
|
</span>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="less">
|
|
.item {
|
|
// &::after {
|
|
// con
|
|
// }
|
|
}
|
|
</style>
|