Skip to content

Commit d107304

Browse files
authored
fix(popup): display should not trigger the scrollview to update (#2773)
* fix(popup): display should not trigger the scrollview to update * fix: test error
1 parent ad9ba90 commit d107304

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/packages/popup/popup.taro.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import React, {
22
FunctionComponent,
3-
useState,
4-
useEffect,
53
ReactElement,
6-
ReactPortal,
74
ReactNode,
5+
ReactPortal,
6+
useEffect,
7+
useState,
88
} from 'react'
99
import { createPortal } from 'react-dom'
1010
import { CSSTransition } from 'react-transition-group'
1111
import classNames from 'classnames'
1212
import { Close } from '@nutui/icons-react-taro'
1313
import { EnterHandler, ExitHandler } from 'react-transition-group/Transition'
14-
import { View, ITouchEvent } from '@tarojs/components'
14+
import { ITouchEvent, View } from '@tarojs/components'
1515
import {
16-
OverlayProps,
1716
defaultOverlayProps,
17+
OverlayProps,
1818
} from '@/packages/overlay/overlay.taro'
1919
import Overlay from '@/packages/overlay/index.taro'
2020
import { ComponentDefaults } from '@/utils/typings'
@@ -271,7 +271,7 @@ export const Popup: FunctionComponent<
271271

272272
const renderNode = () => {
273273
return (
274-
<>
274+
<View catchMove>
275275
{overlay ? (
276276
<Overlay
277277
style={overlayStyles}
@@ -283,8 +283,8 @@ export const Popup: FunctionComponent<
283283
onClick={onHandleClickOverlay}
284284
/>
285285
) : null}
286-
<>{renderPop()}</>
287-
</>
286+
{renderPop()}
287+
</View>
288288
)
289289
}
290290

0 commit comments

Comments
 (0)