diff --git a/frontend_nuxt/components/HeaderComponent.vue b/frontend_nuxt/components/HeaderComponent.vue index f28810f0f..fde55d604 100644 --- a/frontend_nuxt/components/HeaderComponent.vue +++ b/frontend_nuxt/components/HeaderComponent.vue @@ -20,7 +20,7 @@ -
+
@@ -29,13 +29,13 @@
- +
- + -
-
-
- +
+
登录
+
注册
-
登录
-
注册
@@ -142,17 +139,17 @@ const headerMenuItems = computed(() => [ { text: '退出', onClick: goToLogout }, ]) - /** 其余逻辑保持不变 */ - const iconClass = computed(() => { - switch (themeState.mode) { - case ThemeMode.DARK: - return 'fas fa-moon' - case ThemeMode.LIGHT: - return 'fas fa-sun' - default: - return 'fas fa-desktop' - } - }) +/** 其余逻辑保持不变 */ +const iconClass = computed(() => { + switch (themeState.mode) { + case ThemeMode.DARK: + return 'fas fa-moon' + case ThemeMode.LIGHT: + return 'fas fa-sun' + default: + return 'fas fa-desktop' + } +}) onMounted(async () => { const updateAvatar = async () => { @@ -210,10 +207,8 @@ onMounted(async () => { display: flex; flex-direction: row; align-items: center; - justify-content: space-between; width: 100%; height: 100%; - margin: 0 auto; max-width: var(--page-max-width); } @@ -224,6 +219,14 @@ onMounted(async () => { } .header-content-right { + display: flex; + margin-left: auto; + flex-direction: row; + align-items: center; + gap: 20px; +} + +.auth-btns { display: flex; flex-direction: row; align-items: center; @@ -305,7 +308,8 @@ onMounted(async () => { background-color: var(--menu-selected-background-color); } -.search-icon, .theme-icon { +.search-icon, +.theme-icon { font-size: 18px; cursor: pointer; } diff --git a/frontend_nuxt/main.js b/frontend_nuxt/main.js index cf62124f9..fba3aa7a5 100644 --- a/frontend_nuxt/main.js +++ b/frontend_nuxt/main.js @@ -1 +1,5 @@ export { toast } from './composables/useToast' + +export const API_DOMAIN = 'https://www.open-isle.com' +export const API_PORT = '' +export const API_BASE_URL = API_PORT ? `${API_DOMAIN}:${API_PORT}` : API_DOMAIN