From c98a2a3cb87955e53c6e71ebbbce1f811d8a7c3d Mon Sep 17 00:00:00 2001 From: Redon <790348264@qq.com> Date: Sat, 18 Feb 2023 09:25:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E5=A4=8D=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 移动端优化 * feat: 部份移动端问题修复 --- src/components/business/Chat/index.vue | 34 ++++++++++++++++--- .../business/Chat/layout/Layout.vue | 3 +- .../business/Chat/layout/header/index.vue | 2 +- .../business/Chat/layout/sider/index.vue | 9 ++++- 4 files changed, 40 insertions(+), 8 deletions(-) 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(
-
+