From 7588de299de6948bac8c69f2e95ffdf6421b3489 Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Thu, 30 Nov 2023 16:28:35 +0800 Subject: [PATCH] =?UTF-8?q?chore(popover):=20=E7=A4=BA=E4=BE=8B=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20(#2677)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/popover/stories/content.stories.tsx | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/packages/ui/popover/stories/content.stories.tsx b/packages/ui/popover/stories/content.stories.tsx index 53cd5b459..61402d0c0 100644 --- a/packages/ui/popover/stories/content.stories.tsx +++ b/packages/ui/popover/stories/content.stories.tsx @@ -14,6 +14,8 @@ export const Content = () => { const [visible, setVisible] = React.useState(false) const [loading, setLoading] = React.useState(false) + const popoverVisibleRef = React.useRef(false) + const [popoverVisible, setPopoverVisible] = React.useState(false) const title = (
{ }} > 文字标题 - } onClick={() => setVisible(false)} /> + } + onClick={() => { + setVisible(false) + popoverVisibleRef.current = false + }} + />
) @@ -61,7 +70,14 @@ export const Content = () => {
- + +