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

小程序原生插件的驼峰事件绑定都被Taro转换成了小写导致不能触发 #10948

Closed
Przeblysk opened this issue Dec 22, 2021 · 4 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@Przeblysk
Copy link

相关平台

微信小程序

小程序基础库: 2.17.0
使用框架: React

复现步骤

使用极验官方小程序插件

<captcha
  id='captcha'
  gt={gt}
  challenge={challenge}
  offline={offline}
  ononSuccess={this.captchaSuccess}
  lang='zh-cn'
  toReset={toReset}
  product='bind'
  verify={verify}
/>

在开发者工具中查看元素 ononSuccess 的驼峰形式会被转换成小写

<captcha ... bindonsuccess="eh" />

期望结果

驼峰事件不被全部转换为小写可以正常触发

实际结果

驼峰事件被全部转换为小写不可以正常触发

环境信息

👽 Taro v3.3.17


  Taro CLI 3.3.17 environment info:
    System:
      OS: macOS 12.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.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
    npmPackages:
      @tarojs/components: 3.3.17 => 3.3.17
      @tarojs/mini-runner: 3.3.17 => 3.3.17
      @tarojs/plugin-platform-weapp: ^3.3.17 => 3.3.17
      @tarojs/react: 3.3.17 => 3.3.17
      @tarojs/runtime: 3.3.17 => 3.3.17
      @tarojs/taro: 3.3.17 => 3.3.17
      @tarojs/webpack-runner: 3.3.17 => 3.3.17
      babel-preset-taro: 3.3.17 => 3.3.17
      eslint-config-taro: 3.3.17 => 3.3.17
      react: ^17.0.0 => 17.0.2
      taro-ui: 3.0.0-alpha.10 => 3.0.0-alpha.10
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Dec 22, 2021
@Przeblysk
Copy link
Author

Przeblysk commented Dec 22, 2021

相关issue #9187 #8416

@Przeblysk
Copy link
Author

<captcha
  ...
  ononSuccess={this.captchaSuccess}
  bindonSuccess={this.captchaSuccess}
  ...
  />

写成这样可以正常触发

@z0ffy
Copy link
Contributor

z0ffy commented Mar 1, 2022

可以通过ctx.modifyBuildAssets来正则替换

@AlisaWJ
Copy link

AlisaWJ commented Apr 16, 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-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants