Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigateTo方法url属性值为不存在路径时,不触发onPageNotFound方法 #15602

Open
heweishui opened this issue Apr 30, 2024 · 0 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@heweishui
Copy link
Contributor

相关平台

H5

复现仓库

https://github.com/heweishui/mini-program-example2.git
浏览器版本: Chrome 124.0.6367.62
使用框架: React

复现步骤

https://github.com/heweishui/mini-program-example2.git 仓库将代码拉取下来

  1. 执行pnpm install命令下载所有依赖,然后执行命令跑起项目

    pnpm run dev:h5
    

​ example跑起来之后,在首页点击NavigateTo按钮,打开控制台查看结果

期望结果

NavigateTo方法url属性值为不存在路径时,触发onPageNotFound方法,执行onPageNotFound中传入的回调函数

实际结果

NavigateTo方法url属性值为不存在路径时,不触发onPageNotFound方法

环境信息

Taro CLI 3.6.28 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 18.17.0 - C:\Program Files\nodejs\node.EXE 
      npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD     
    npmPackages:
      @tarojs/cli: 3.6.28 => 3.6.28
      @tarojs/components: 3.6.28 => 3.6.28
      @tarojs/helper: 3.6.28 => 3.6.28
      @tarojs/plugin-framework-react: 3.6.28 => 3.6.28 
      @tarojs/plugin-platform-alipay: 3.6.28 => 3.6.28 
      @tarojs/plugin-platform-h5: 3.6.28 => 3.6.28     
      @tarojs/plugin-platform-jd: 3.6.28 => 3.6.28     
      @tarojs/plugin-platform-qq: 3.6.28 => 3.6.28     
      @tarojs/plugin-platform-swan: 3.6.28 => 3.6.28   
      @tarojs/plugin-platform-tt: 3.6.28 => 3.6.28
      @tarojs/plugin-platform-weapp: 3.6.28 => 3.6.28
      @tarojs/react: 3.6.28 => 3.6.28
      @tarojs/runtime: 3.6.28 => 3.6.28
      @tarojs/shared: 3.6.28 => 3.6.28
      @tarojs/taro: 3.6.28 => 3.6.28
      @tarojs/taro-loader: 3.6.28 => 3.6.28
      @tarojs/webpack5-runner: 3.6.28 => 3.6.28
      babel-preset-taro: 3.6.28 => 3.6.28
      eslint-config-taro: 3.6.28 => 3.6.28
      react: ^18.0.0 => 18.3.1
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Apr 30, 2024
This was referenced May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Status: 框架
Development

No branches or pull requests

1 participant