fix(chat): 优化chat页面项部样式

This commit is contained in:
sophie committed 2026-06-24 11:23:04 +08:00
1 parent 0d3a812e16
commit 4474ef7e3f
5 files changed
+25 -22

No files matched your search

@@ -31,23 +31,16 @@ const emit = defineEmits<{
const { t } = useI18n(); const { t } = useI18n();
const avatarLabel = computed(() => (props.agentName === '人事规章' ? 'HR' : 'AI')); const displayAgentName = computed(() => props.agentName || t('chat.assistantLabel'));
const welcomeTitle = computed(() => (
props.agentName === '人事规章'
? '你好,我是人事规章 AI 助手'
: t('chat.welcomeTitle')
));
</script> </script>
<template> <template>
<div class="flex h-full min-h-0 w-full flex-col items-center px-4 pb-2 pt-2 md:pb-3"> <div class="flex h-full min-h-0 w-full flex-col items-center px-4 pb-2 pt-2 md:pb-3">
<template v-if="suggestedQuestionsStyle === 'styled' && styledSections.length > 0"> <template v-if="suggestedQuestionsStyle === 'styled' && styledSections.length > 0">
<div class="mb-6 mt-2 flex h-16 w-16 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-2xl font-bold text-white shadow-lg shadow-brand-500/20"> <h2 class="mb-8 mt-12 shrink-0 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
{{ avatarLabel }} <span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
</div> <span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
<h2 class="mb-6 shrink-0 text-center text-xl font-bold text-primary md:text-2xl"> <span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
{{ welcomeTitle }}
</h2> </h2>
<div class="min-h-0 w-full flex-1 overflow-y-auto pb-2"> <div class="min-h-0 w-full flex-1 overflow-y-auto pb-2">
@@ -81,11 +74,10 @@ const welcomeTitle = computed(() => (
</template> </template>
<template v-else-if="suggestedQuestions.length > 0"> <template v-else-if="suggestedQuestions.length > 0">
<div class="mb-6 mt-2 flex h-16 w-16 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-2xl font-bold text-white shadow-lg shadow-brand-500/20"> <h2 class="mb-8 mt-12 shrink-0 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
AI <span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
</div> <span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
<h2 class="mb-6 shrink-0 text-center text-xl font-medium text-primary md:text-2xl"> <span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
{{ $t('chat.welcomeTitle') }}
</h2> </h2>
<div class="min-h-0 w-full flex-1 overflow-y-auto pb-2"> <div class="min-h-0 w-full flex-1 overflow-y-auto pb-2">
@@ -104,11 +96,10 @@ const welcomeTitle = computed(() => (
</template> </template>
<template v-else> <template v-else>
<div class="mb-6 mt-2 flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-2xl font-bold text-white shadow-lg shadow-brand-500/20"> <h2 class="mt-12 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
AI <span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
</div> <span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
<h2 class="text-center text-xl font-medium text-primary md:text-2xl"> <span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
{{ $t('chat.welcomeTitle') }}
</h2> </h2>
</template> </template>
</div> </div>
+3
View File
@@ -175,6 +175,9 @@
"langTh": "Thai", "langTh": "Thai",
"logout": "Logout", "logout": "Logout",
"welcomeTitle": "Hello, I am Hexin AI Digital Human", "welcomeTitle": "Hello, I am Hexin AI Digital Human",
"welcomeAgentTitle": "Hello, you are now in the {agentName} agent",
"welcomeAgentTitlePrefix": "Hello, you are now in the",
"welcomeAgentTitleSuffix": "agent",
"askAnything": "Ask me anything...", "askAnything": "Ask me anything...",
"voiceFeature": "Voice feature", "voiceFeature": "Voice feature",
"voiceListening": "Listening...", "voiceListening": "Listening...",
+3
View File
@@ -175,6 +175,9 @@
"langTh": "ไทย", "langTh": "ไทย",
"logout": "ออกจากระบบ", "logout": "ออกจากระบบ",
"welcomeTitle": "สวัสดี ฉันคือ AI Digital Human ของ Hexin", "welcomeTitle": "สวัสดี ฉันคือ AI Digital Human ของ Hexin",
"welcomeAgentTitle": "สวัสดี คุณเข้าสู่ตัวแทน {agentName} แล้ว",
"welcomeAgentTitlePrefix": "สวัสดี คุณเข้าสู่ตัวแทน",
"welcomeAgentTitleSuffix": "แล้ว",
"askAnything": "ถามฉันได้ทุกเรื่อง...", "askAnything": "ถามฉันได้ทุกเรื่อง...",
"voiceFeature": "ฟีเจอร์เสียง", "voiceFeature": "ฟีเจอร์เสียง",
"voiceListening": "กำลังฟัง...", "voiceListening": "กำลังฟัง...",
+3
View File
@@ -179,6 +179,9 @@
"langTh": "ไทย", "langTh": "ไทย",
"logout": "退出登录", "logout": "退出登录",
"welcomeTitle": "你好,我是和信AI数字人", "welcomeTitle": "你好,我是和信AI数字人",
"welcomeAgentTitle": "你好,您已进入{agentName}智能体",
"welcomeAgentTitlePrefix": "你好,您已进入",
"welcomeAgentTitleSuffix": "智能体",
"askAnything": "问我任何事...", "askAnything": "问我任何事...",
"voiceFeature": "语音功能", "voiceFeature": "语音功能",
"voiceListening": "正在聆听…", "voiceListening": "正在聆听…",
+3
View File
@@ -175,6 +175,9 @@
"langTh": "ไทย", "langTh": "ไทย",
"logout": "退出登入", "logout": "退出登入",
"welcomeTitle": "你好,我是和信AI數字人", "welcomeTitle": "你好,我是和信AI數字人",
"welcomeAgentTitle": "你好,您已進入{agentName}智能體",
"welcomeAgentTitlePrefix": "你好,您已進入",
"welcomeAgentTitleSuffix": "智能體",
"askAnything": "問我任何事...", "askAnything": "問我任何事...",
"voiceFeature": "語音功能", "voiceFeature": "語音功能",
"voiceListening": "正在聆聽…", "voiceListening": "正在聆聽…",