feat(projects): 上下结构,菜单支持横向滚动
This commit is contained in:
parent
906aed5e75
commit
808051b29d
@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div style="flex: 1; overflow: hidden; padding: 0 10px">
|
||||||
|
<n-scrollbar :x-scrollable="true" class="flex-1-hidden">
|
||||||
<n-menu
|
<n-menu
|
||||||
:value="activeKey"
|
:value="activeKey"
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
@ -6,6 +8,8 @@
|
|||||||
:inverted="theme.header.inverted"
|
:inverted="theme.header.inverted"
|
||||||
@update:value="handleUpdateMenu"
|
@update:value="handleUpdateMenu"
|
||||||
/>
|
/>
|
||||||
|
</n-scrollbar>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -29,4 +33,21 @@ function handleUpdateMenu(_key: string, item: MenuOption) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.n-menu-item-content__icon) {
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
:deep(.n-menu .n-menu-item) {
|
||||||
|
margin-top: 0;
|
||||||
|
// margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
:deep(.n-menu .n-menu-item::before) {
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
:deep(.n-menu-item-content-header) {
|
||||||
|
overflow: inherit !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user