diff --git a/src/components/agent/AgentAssistantEntry.vue b/src/components/agent/AgentAssistantEntry.vue index 9d0a2114..8a1b76b7 100644 --- a/src/components/agent/AgentAssistantEntry.vue +++ b/src/components/agent/AgentAssistantEntry.vue @@ -11,6 +11,7 @@ import { useI18n } from 'vue-i18n' import AgentPetStage from './pet/AgentPetStage.vue' import type { AgentPetActionName, AgentPetIntent } from './pet/types' import { useAgentPetMachine } from './pet/useAgentPetMachine' +import { AGENT_ASSISTANT_LAYER_Z_INDEX } from '@/constants/agentAssistant' interface AgentAssistantEntryBubble { id: string @@ -163,6 +164,7 @@ const fabPositionStyle = computed(() => { ...fabPointerStyle.value, '--agent-assistant-fab-x': `${position.x}px`, '--agent-assistant-fab-y': `${position.y}px`, + zIndex: AGENT_ASSISTANT_LAYER_Z_INDEX.entry, } }) const fabBubblePlacement = ref('top') @@ -1570,9 +1572,6 @@ defineExpose({ .agent-assistant-fab { position: fixed; - /* 保持机器人和提示气泡高于 Vuetify 弹窗(2400)及全局 Toast(2500)。 */ - z-index: 2600; - --agent-assistant-robot-outline: color-mix(in srgb, rgb(var(--v-theme-primary)) 72%, #090510 28%); --agent-assistant-robot-outline-soft: color-mix(in srgb, rgb(var(--v-theme-primary)) 84%, #090510 16%); --agent-assistant-robot-shell-start: color-mix(in srgb, rgb(var(--v-theme-primary)) 38%, white 62%); diff --git a/src/components/agent/AgentAssistantPanel.vue b/src/components/agent/AgentAssistantPanel.vue index b78daae8..2644776d 100644 --- a/src/components/agent/AgentAssistantPanel.vue +++ b/src/components/agent/AgentAssistantPanel.vue @@ -5,6 +5,7 @@ import { useDisplay } from 'vuetify' import { useI18n } from 'vue-i18n' import { useAuthStore, useUserStore } from '@/stores' import { getCurrentLocale } from '@/plugins/i18n' +import { AGENT_ASSISTANT_LAYER_Z_INDEX } from '@/constants/agentAssistant' type AgentMessageRole = 'user' | 'assistant' type AgentMessageStatus = 'idle' | 'streaming' | 'done' | 'error' @@ -296,6 +297,7 @@ const isOpen = computed({ }) const drawerStyle = computed(() => ({ '--agent-assistant-panel-width': drawerWidth.value, + zIndex: AGENT_ASSISTANT_LAYER_Z_INDEX.panel, })) // 创建前端展示用的临时 ID。 @@ -2130,11 +2132,11 @@ onScopeDispose(() => { - -