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

[BUG] usePageEvent 同路由转跳时,历史页面的事件也被触发 #1225

Closed
k55k32 opened this issue Aug 11, 2020 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@k55k32
Copy link

k55k32 commented Aug 11, 2020

bug 描述
当使用 usePageEvent 的时候, 页面路径相同,参数不同时,转跳后,之前路由的页面响应的event也会被触发

复现步骤
写一个页面,监听 usePageEvent('onShow', () => console.log('hello')) 事件,页面写个按钮,也是跳到这个当前页面,可以传不同参数

期望结果
同页面路径转跳后,hello 只被输出一次

版本信息:

  • remax 版本: [e.g. 2.7.7]
  • 手机型号 [e.g. 开发者工具]
  • 小程序端 [e.g. 支付宝小程序]
  • 开发环境 [e.g. win10]
@k55k32 k55k32 added the bug Something isn't working label Aug 11, 2020
@k55k32 k55k32 changed the title [BUG] usePageEvent [BUG] usePageEvent 同路由转跳时,历史页面的事件也被触发 Aug 11, 2020
@Darmody
Copy link
Contributor

Darmody commented Aug 17, 2020

是 web 环境的问题吗?

@k55k32
Copy link
Author

k55k32 commented Aug 18, 2020

是 web 环境的问题吗?

是 web 环境的问题吗?

支付宝小程序开发者工具中出现的问题

@Darmody
Copy link
Contributor

Darmody commented Aug 31, 2020

@k55k32 我试了试没有复现额

@Darmody
Copy link
Contributor

Darmody commented Aug 31, 2020

@k55k32 我试了试没有复现额

微信没问题,支付宝确实有问题🤔

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

No branches or pull requests

2 participants