diff --git a/src/components/business/Chat/index.vue b/src/components/business/Chat/index.vue index 884e70a..98fe80c 100644 --- a/src/components/business/Chat/index.vue +++ b/src/components/business/Chat/index.vue @@ -8,6 +8,7 @@ import { useChat } from './hooks/useChat' import { fetchChatAPI } from '@/api' import { HoverButton, SvgIcon } from '@/components/common' import { useHistoryStore } from '@/store' +import { useBasicLayout } from '@/hooks/useBasicLayout' let controller = new AbortController() @@ -15,6 +16,8 @@ const ms = useMessage() const historyStore = useHistoryStore() +const { isMobile } = useBasicLayout() + let messageReactive: MessageReactive | null = null const scrollRef = ref() @@ -30,6 +33,12 @@ const heartbeat = computed(() => historyStore.heartbeat) const list = computed(() => historyStore.getCurrentChat) const chatList = computed(() => list.value.filter(item => (!item.reversal && !item.error))) +const footerMobileStyle = computed(() => { + if (isMobile.value) + return ['pl-2', 'pt-2', 'pb-6', 'fixed', 'bottom-0', 'left-0', 'right-0', 'z-30'] + return [] +}) + async function handleSubmit() { if (loading.value) return @@ -143,7 +152,11 @@ watch(
-
+