fix: pullRefresh增加移动端判断 (#5343)

Co-authored-by: hongyang03 <hongyang03@baidu.com>
This commit is contained in:
HongYang 2022-09-08 19:48:48 +08:00 committed by RUNZE LU
parent d6709a1143
commit b0fb1f402b

View File

@ -40,7 +40,7 @@ import {resolveVariable} from 'amis-core';
import {buildStyle} from 'amis-core';
import {PullRefresh} from 'amis-ui';
import position from 'amis-core';
import {scrollPosition} from 'amis-core';
import {scrollPosition, isMobile} from 'amis-core';
/**
*
@ -786,6 +786,7 @@ export default class Page extends React.Component<PageProps> {
data,
asideResizor,
pullRefresh,
useMobileUI,
translate: __
} = this.props;
@ -862,7 +863,7 @@ export default class Page extends React.Component<PageProps> {
</div>
) : null}
{pullRefresh && !pullRefresh.disabled ? (
{useMobileUI && isMobile() && pullRefresh && !pullRefresh.disabled ? (
<PullRefresh
{...pullRefresh}
translate={__}