feat: header menu align support (#5256)

* feat: header menu align support

* fix: typo
This commit is contained in:
Netfan
2024-12-28 16:16:48 +08:00
committed by GitHub
parent 15fe82c62f
commit ec2c6eff6f
10 changed files with 73 additions and 4 deletions

View File

@@ -133,7 +133,10 @@ function clearPreferencesAndLogout() {
>
<slot :name="slot.name"></slot>
</template>
<div class="flex h-full min-w-0 flex-1 items-center">
<div
:class="`menu-align-${preferences.header.menuAlign}`"
class="flex h-full min-w-0 flex-1 items-center"
>
<slot name="menu"></slot>
</div>
<div class="flex h-full min-w-0 flex-shrink-0 items-center">
@@ -166,3 +169,16 @@ function clearPreferencesAndLogout() {
</template>
</div>
</template>
<style lang="scss" scoped>
.menu-align-start {
--menu-align: start;
}
.menu-align-center {
--menu-align: center;
}
.menu-align-end {
--menu-align: end;
}
</style>