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

支付宝原生插件使用时如何正确传入onXXX事件 #17042

Open
chenweiliang6 opened this issue Dec 16, 2024 · 0 comments
Open

支付宝原生插件使用时如何正确传入onXXX事件 #17042

chenweiliang6 opened this issue Dec 16, 2024 · 0 comments

Comments

@chenweiliang6
Copy link

相关平台

支付宝小程序

小程序基础库: 2.9.30
使用框架: Vue 3

复现步骤

taro vue3开发支付宝小程序,引入了支付宝的原生组件,但是由于支付宝是通过onXXX来传函数到内部去只执行,相当于vue3的emits,vue文件中通过@xxx="handleData"去触发一个函数

期望结果

能够正确触发handleData函数

实际结果

出现报错TypeError: Cannot read properties of undefined (reading 'type')
at Object._eventHandler [as eh] (taro.js:4954:9)
at e.invokeMethod (af-appx.worker.min.js:6:423501)
at e.invokeTargetMethodWithArgs (af-appx.worker.min.js:6:866931)
at e.callEvent (af-appx.worker.min.js:6:214321)
at Object._h [as V] (af-appx.worker.min.js:6:470529)
at Object.k__2 [as onChufa] (runtime.js:8:1)
at Object.touchStart (index.js:88:18)
at e.invoke (af-appx.worker.min.js:6:715807)
at e.invokePublicMethod (af-appx.worker.min.js:6:709660)
at a0 (af-appx.worker.min.js:6:696186)

环境信息

  Taro CLI 3.6.23 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 16.18.1 - F:\nvm\nodejs\node.EXE
      npm: 9.8.1 - F:\nvm\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: ^3.6.15 => 3.6.35
      @tarojs/components: ^3.6.15 => 3.6.35
      @tarojs/plugin-framework-vue3: ^3.6.15 => 3.6.35
      @tarojs/plugin-html: ^3.6.15 => 3.6.35
      @tarojs/plugin-platform-h5: ^3.6.15 => 3.6.35
      @tarojs/runtime: ^3.6.15 => 3.6.35
      @tarojs/taro: ^3.6.15 => 3.6.35
      @tarojs/webpack5-runner: ^3.6.23 => 3.6.35
      babel-preset-taro: ^3.6.15 => 3.6.35
      eslint-config-taro: ^3.6.15 => 3.6.35
This was referenced Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant