From d107304ea8e773d8f89c97d03bac83233897110d Mon Sep 17 00:00:00 2001 From: oasis <12181600+oasis-cloud@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:11:22 +0800 Subject: [PATCH] fix(popup): display should not trigger the scrollview to update (#2773) * fix(popup): display should not trigger the scrollview to update * fix: test error --- src/packages/popup/popup.taro.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/packages/popup/popup.taro.tsx b/src/packages/popup/popup.taro.tsx index 759195e01c..a18033e460 100644 --- a/src/packages/popup/popup.taro.tsx +++ b/src/packages/popup/popup.taro.tsx @@ -1,20 +1,20 @@ import React, { FunctionComponent, - useState, - useEffect, ReactElement, - ReactPortal, ReactNode, + ReactPortal, + useEffect, + useState, } from 'react' import { createPortal } from 'react-dom' import { CSSTransition } from 'react-transition-group' import classNames from 'classnames' import { Close } from '@nutui/icons-react-taro' import { EnterHandler, ExitHandler } from 'react-transition-group/Transition' -import { View, ITouchEvent } from '@tarojs/components' +import { ITouchEvent, View } from '@tarojs/components' import { - OverlayProps, defaultOverlayProps, + OverlayProps, } from '@/packages/overlay/overlay.taro' import Overlay from '@/packages/overlay/index.taro' import { ComponentDefaults } from '@/utils/typings' @@ -271,7 +271,7 @@ export const Popup: FunctionComponent< const renderNode = () => { return ( - <> + {overlay ? ( ) : null} - <>{renderPop()} - + {renderPop()} + ) }