fix(chat): 优化chat页面项部样式
This commit is contained in:
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 avatarLabel = computed(() => (props.agentName === '人事规章' ? 'HR' : 'AI'));
|
||||
|
||||
const welcomeTitle = computed(() => (
|
||||
props.agentName === '人事规章'
|
||||
? '你好,我是人事规章 AI 助手'
|
||||
: t('chat.welcomeTitle')
|
||||
));
|
||||
const displayAgentName = computed(() => props.agentName || t('chat.assistantLabel'));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<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">
|
||||
<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">
|
||||
{{ avatarLabel }}
|
||||
</div>
|
||||
<h2 class="mb-6 shrink-0 text-center text-xl font-bold text-primary md:text-2xl">
|
||||
{{ welcomeTitle }}
|
||||
<h2 class="mb-8 mt-12 shrink-0 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
|
||||
<span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
|
||||
<span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
|
||||
<span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
|
||||
</h2>
|
||||
|
||||
<div class="min-h-0 w-full flex-1 overflow-y-auto pb-2">
|
||||
@@ -81,11 +74,10 @@ const welcomeTitle = computed(() => (
|
||||
</template>
|
||||
|
||||
<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">
|
||||
AI
|
||||
</div>
|
||||
<h2 class="mb-6 shrink-0 text-center text-xl font-medium text-primary md:text-2xl">
|
||||
{{ $t('chat.welcomeTitle') }}
|
||||
<h2 class="mb-8 mt-12 shrink-0 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
|
||||
<span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
|
||||
<span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
|
||||
<span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
|
||||
</h2>
|
||||
|
||||
<div class="min-h-0 w-full flex-1 overflow-y-auto pb-2">
|
||||
@@ -104,11 +96,10 @@ const welcomeTitle = computed(() => (
|
||||
</template>
|
||||
|
||||
<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">
|
||||
AI
|
||||
</div>
|
||||
<h2 class="text-center text-xl font-medium text-primary md:text-2xl">
|
||||
{{ $t('chat.welcomeTitle') }}
|
||||
<h2 class="mt-12 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
|
||||
<span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
|
||||
<span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
|
||||
<span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
|
||||
</h2>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user