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

第一次进入页面,onShow 会触发两次 #10728

Closed
panhezeng opened this issue Nov 24, 2021 · 1 comment · Fixed by #10886
Closed

第一次进入页面,onShow 会触发两次 #10728

panhezeng opened this issue Nov 24, 2021 · 1 comment · Fixed by #10886
Labels
bug Something isn't working F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@panhezeng
Copy link

相关平台

微信小程序

复现仓库

https://github.com/panhezeng/taro-vue-template
小程序基础库: 2.21.0
使用框架: Vue 3

复现步骤

onShow() {
console.log("index-page onShow");
},

npm run build:weapp -- --watch

期望结果

第一次进入页面,应该只出现一次 "index-page onShow" 输出

实际结果

会出现两次 "index-page onShow"

环境信息

 Taro CLI 3.3.15 environment info:
    System:
      OS: macOS 12.0.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
      npm: 8.1.4 - ~/.nvm/versions/node/v16.13.0/bin/npm
    npmPackages:
      @tarojs/components: ^3.3.15 => 3.3.15 
      @tarojs/mini-runner: ^3.3.15 => 3.3.15 
      @tarojs/runtime: ^3.3.15 => 3.3.15 
      @tarojs/taro: ^3.3.15 => 3.3.15 
      @tarojs/webpack-runner: ^3.3.15 => 3.3.15 
      babel-preset-taro: ^3.3.15 => 3.3.15 
      eslint-config-taro: ^3.3.15 => 3.3.15 
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Nov 24, 2021
@Chen-jj Chen-jj added this to the 3.3.16 milestone Nov 24, 2021
@Chen-jj Chen-jj added the bug Something isn't working label Nov 24, 2021
@panhezeng
Copy link
Author

taro 不支持 webpack 5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
2 participants