code-origin/pc/layouts/components/header/admin.vue

25 lines
581 B
Vue
Raw Permalink Normal View History

2023-11-08 17:59:25 +08:00
<template>
<NuxtLink :to="appStore.getAdminUrl" target="_blank">
<ElMenuItem :index="menuItem.path">
<template #title>
<span>
{{ menuItem.name }}
</span>
</template>
</ElMenuItem>
</NuxtLink>
</template>
<script lang="ts" setup>
import { ElMenuItem } from 'element-plus'
import { useAppStore } from '~~/stores/app'
defineProps({
menuItem: {
type: Object,
default: () => ({})
}
})
const appStore = useAppStore()
</script>
<style lang="scss" scoped></style>