@@ -9,10 +9,11 @@ import React, {
99 useRef ,
1010} from 'react'
1111import classNames from 'classnames'
12- import { getSystemInfoSync , usePageScroll } from '@tarojs/taro'
12+ import { usePageScroll } from '@tarojs/taro'
1313import { View } from '@tarojs/components'
1414import { CSSTransition } from 'react-transition-group'
1515import { Check } from '@nutui/icons-react-taro'
16+ import { getWindowInfo } from '@/utils/get-system-info'
1617import { Overlay } from '@/packages/overlay/overlay.taro'
1718import { getRectByTaro } from '@/utils/get-rect-by-taro'
1819import { BasicComponent , ComponentDefaults } from '@/utils/typings'
@@ -106,7 +107,7 @@ export const MenuItem = forwardRef((props: Partial<MenuItemProps>, ref) => {
106107 getParentOffset ( )
107108 } , [ showPopup , getParentOffset ] )
108109
109- const windowHeight = useMemo ( ( ) => getSystemInfoSync ( ) . windowHeight , [ ] )
110+ const windowHeight = useMemo ( ( ) => getWindowInfo ( ) . windowHeight , [ ] )
110111 const updateItemOffset = useCallback ( ( ) => {
111112 if ( ! parent . lockScroll ) return
112113 const p = parent . menuRef . current
@@ -163,7 +164,7 @@ export const MenuItem = forwardRef((props: Partial<MenuItemProps>, ref) => {
163164 height : 'initial' ,
164165 }
165166 : {
166- bottom : `${ getSystemInfoSync ( ) . windowHeight - position . top } px` ,
167+ bottom : `${ getWindowInfo ( ) . windowHeight - position . top } px` ,
167168 top : '0' ,
168169 height : 'initial' ,
169170 }
@@ -177,7 +178,7 @@ export const MenuItem = forwardRef((props: Partial<MenuItemProps>, ref) => {
177178 }
178179 }
179180 return {
180- height : `${ getSystemInfoSync ( ) . windowHeight - position . top } px` ,
181+ height : `${ getWindowInfo ( ) . windowHeight - position . top } px` ,
181182 top : 'auto' ,
182183 ...isShow ( ) ,
183184 }
0 commit comments