From 9a29e1a3b32a7b9c32330aa4e78a123af361b09f Mon Sep 17 00:00:00 2001 From: Clever Date: Fri, 2 Aug 2024 15:03:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20useStyles=20?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=BC=95=E5=8F=91=E7=9A=84=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=20(#293)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复 useStyles 可能引发的异常 * fix: 修复 useStyles 可能引发的异常 --------- Co-authored-by: LengYXin --- src/ActionIcon/style.ts | 2 +- src/BackBottom/style.ts | 2 +- src/ProChat/container/App.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ActionIcon/style.ts b/src/ActionIcon/style.ts index 7dd47e29..744af5c9 100644 --- a/src/ActionIcon/style.ts +++ b/src/ActionIcon/style.ts @@ -4,7 +4,7 @@ export const useStyles = createStyles( ({ css, stylish, cx }, { glass }: { active: boolean; glass: boolean }) => { return { block: cx( - glass && stylish.blur, + glass && stylish?.blur, css` cursor: pointer; diff --git a/src/BackBottom/style.ts b/src/BackBottom/style.ts index f5e24669..98e8ae66 100644 --- a/src/BackBottom/style.ts +++ b/src/BackBottom/style.ts @@ -2,7 +2,7 @@ import { createStyles } from 'antd-style'; export const useStyles = createStyles(({ token, css, stylish, cx }, visible: boolean) => cx( - stylish.blur, + stylish?.blur, css` pointer-events: ${visible ? 'all' : 'none'}; diff --git a/src/ProChat/container/App.tsx b/src/ProChat/container/App.tsx index 42eb7df2..332018d4 100644 --- a/src/ProChat/container/App.tsx +++ b/src/ProChat/container/App.tsx @@ -21,8 +21,8 @@ const useStyles = createStyles( ({ css, responsive, stylish }) => css` overflow: hidden scroll; height: 100%; - ${responsive.mobile} { - ${stylish.noScrollbar} + ${responsive?.mobile} { + ${stylish?.noScrollbar} width: 100%; } `,