From 6d3d0918b58f148462422895cda23cd3a6111c52 Mon Sep 17 00:00:00 2001 From: lipenghui Date: Tue, 30 Jan 2024 09:40:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:1.=20=E5=9B=BE=E7=89=87=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2=E6=94=B9=E4=B8=BA=E7=BA=AF=E9=BB=91?= =?UTF-8?q?=EF=BC=9B2.=20=E8=B7=AF=E7=94=B1=E5=AE=88=E5=8D=AB=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=E4=BA=8Elogin=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/design/index.scss | 9 +++++++++ src/hooks/useMqtt.ts | 3 ++- src/router/guard.ts | 9 +++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/design/index.scss b/src/design/index.scss index bbbbb49..2cf2717 100644 --- a/src/design/index.scss +++ b/src/design/index.scss @@ -77,6 +77,15 @@ html[data-theme="dark"] { } } +// ant 图片预览遮罩 +.ant-image-preview-mask { + background-color: rgba($color: #000000, $alpha: 1) !important; +} +// markdown 图片预览遮罩 +.medium-zoom-overlay { + background: rgba($color: #000000, $alpha: 1) !important; +} + // 保持 和 windi 一样的全局样式,减少升级带来的影响 ul { padding: 0; diff --git a/src/hooks/useMqtt.ts b/src/hooks/useMqtt.ts index 7d9d554..0c5da03 100644 --- a/src/hooks/useMqtt.ts +++ b/src/hooks/useMqtt.ts @@ -40,7 +40,8 @@ export function useMqtt() { if (message.conversationId !== messageStore.getConversationData.id) { return } - console.log(message.message_content.length) + // console.log(message) + // console.log(topicKey, message.message_content.length) if (message.message_type === MessageStatusEnum.ACTICON) { // 这里主要是知识库的数据更新,因为知识库回答是每次都是一个字,并不是通常的不断叠加,需要前端手动叠加 diff --git a/src/router/guard.ts b/src/router/guard.ts index 78077aa..bb9a4cc 100644 --- a/src/router/guard.ts +++ b/src/router/guard.ts @@ -13,13 +13,18 @@ const WHITE_NAME_LIST: string[] = [ function createRouterGuards(router: Router) { const userStore = useUserStore() // 前置 - router.beforeEach(async (to, _from, next) => { + router.beforeEach(async (to, from, next) => { const isErrorPage = router.getRoutes().findIndex(item => item.name === to.name) if (isErrorPage === -1) next({ name: PageEnum.ERROR_PAGE_NAME_404 }) if (userStore.getToken) { - next() + if (WHITE_NAME_LIST.includes(to.name as string)) { + next({ name: from.name as string }) + } + else { + next() + } } else { if (WHITE_NAME_LIST.includes(to.name as string))