feat: 添加返回导航图标
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy
2025-07-29 11:42:20 +08:00
parent fb537fdc00
commit ce445ae088
4 changed files with 29 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import {
LanguageToggle,
PreferencesButton,
ThemeToggle,
BackNavigation,
} from '../../widgets';
interface Props {
@@ -43,7 +44,8 @@ const rightSlots = computed(() => {
list.push({
index: REFERENCE_VALUE,
name: 'global-search',
});
}
);
}
if (preferencesButtonPosition.value.header) {
@@ -76,6 +78,12 @@ const rightSlots = computed(() => {
name: 'notification',
});
}
if (preferences.widget.backNavigation) {
list.push({
index: REFERENCE_VALUE + 60,
name: 'back-navigation',
});
}
Object.keys(slots).forEach((key) => {
const name = key.split('-');
@@ -164,6 +172,9 @@ function clearPreferencesAndLogout() {
<template v-else-if="slot.name === 'fullscreen'">
<VbenFullScreen class="mr-1" />
</template>
<template v-else-if="slot.name === 'back-navigation'">
<BackNavigation class="mr-1" />
</template>
</slot>
</template>
</div>