From e2b466042f76915e637e3d40cd06f5631ffd3e43 Mon Sep 17 00:00:00 2001 From: zhengw <247276359@qq.com> Date: Wed, 12 Apr 2023 10:19:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91:=20=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=94=B9=E6=88=90hash=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.ts | 6 +++--- src/pages/ChatLogs/components/ChatRecord.tsx | 2 +- src/pages/ChatLogs/components/ChatVideo.tsx | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config/config.ts b/config/config.ts index d25bfef..960a7f1 100644 --- a/config/config.ts +++ b/config/config.ts @@ -14,9 +14,9 @@ export default defineConfig({ */ hash: true, // hash 路由 - // history: { - // type: 'hash', - // }, + history: { + type: 'hash', + }, /** * @name 兼容性设置 * @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖 diff --git a/src/pages/ChatLogs/components/ChatRecord.tsx b/src/pages/ChatLogs/components/ChatRecord.tsx index f00e7f7..2939e15 100644 --- a/src/pages/ChatLogs/components/ChatRecord.tsx +++ b/src/pages/ChatLogs/components/ChatRecord.tsx @@ -97,7 +97,7 @@ export const ChatRecord: React.FC = (props) => { return (
{chatRecordContent(item)}
diff --git a/src/pages/ChatLogs/components/ChatVideo.tsx b/src/pages/ChatLogs/components/ChatVideo.tsx index da70afe..1daac6d 100644 --- a/src/pages/ChatLogs/components/ChatVideo.tsx +++ b/src/pages/ChatLogs/components/ChatVideo.tsx @@ -29,9 +29,11 @@ export const ChatVideo: React.FC = (props) => { className={styles.video} onClick={() => { setOpen(true); - videoRef.current.play().catch((error) => { - console.log(error); - }); + setTimeout(() => { + videoRef.current.play().catch((error) => { + console.log(error); + }); + }, 100); }} >