feat: 重構主佈局及相關元件,更新命名規則並新增功能

This commit is contained in:
skytek_xinliang
2026-03-30 15:14:12 +08:00
parent 79b20ded3b
commit d7ebbda3d3
10 changed files with 27 additions and 27 deletions
@@ -0,0 +1,43 @@
<template>
<v-sheet class="mobile-menu-panel d-flex flex-column" color="surface">
<v-list class="px-2 py-2 flex-grow-1 overflow-auto" density="comfortable">
<v-list-item
v-for="item in mobileCurrentItems"
:key="item.path ?? item.title"
class="mb-1"
rounded="lg"
@click="emit('item-click', item)"
>
<v-list-item-title class="text-body-2">{{ item.title }}</v-list-item-title>
<template #append>
<v-icon size="18" :icon="item.subItems?.length ? mdiChevronRight : mdiArrowTopRight" />
</template>
</v-list-item>
</v-list>
</v-sheet>
</template>
<script setup lang="ts">
import type { AdminLayoutMenuItem } from './types'
import { mdiArrowTopRight, mdiChevronRight } from '@mdi/js'
withDefaults(
defineProps<{
mobileCurrentItems?: AdminLayoutMenuItem[]
}>(),
{
mobileCurrentItems: () => [],
}
)
const emit = defineEmits<{
'item-click': [item: AdminLayoutMenuItem]
}>()
</script>
<style scoped>
.mobile-menu-panel {
min-height: 0;
height: 100%;
}
</style>