Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG] remax 打包H5 下拉刷新一直触发 #1689

Closed
hdd2510 opened this issue Aug 20, 2021 · 1 comment
Closed

[BUG] remax 打包H5 下拉刷新一直触发 #1689

hdd2510 opened this issue Aug 20, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@hdd2510
Copy link

hdd2510 commented Aug 20, 2021

bug 描述
我在子组建上先向上滑动了,然后向下划动,但是此时会触发下拉刷新.

复现步骤
新建 index 页面

index.config.web.js

module.exports = {
   allowsBounceVertical: 'YES',
   pullRefresh: true,
   transparentTitle: 'always',
};

index.tsx

import * as React from 'react';
import { usePageEvent } from 'remax/macro';
import { View, navigateTo } from 'remax/one';

export default () => {

  usePageEvent('onPullDownRefresh', () => {
     console.log('触发下拉刷新');
  });

  return (
    <React.Fragment>
      <View style={{ height: '200vh', width: '100%', backgroundColor: 'red' }}></View>
      <View style={{ height: '200px', width: '100%', backgroundColor: 'blue', color: 'white' }}>到底了, 依旧触发下拉刷新</View>
    </React.Fragment>
  );
}

期望结果
[描述你原本期望看到的结果]
希望子容器达到顶部的时候才可以出发下拉
复现代码
[拷贝上方的复现步骤代码即可]

版本信息:

  • remax 版本: [e.g. 2.13.2 应该是 所有版本都存在此问题],
  • 手机型号 [e.g. iPhone X]
  • 小程序端 [e.g. h5 web端]
  • 开发环境 [e.g. mac OS]

其他信息

image

@hdd2510 hdd2510 added the bug Something isn't working label Aug 20, 2021
@hdd2510
Copy link
Author

hdd2510 commented Aug 30, 2021

建议解决方式:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant