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

使用第三方组件 vant-weapp, 绑定的事件名为kebab-case不生效 #8364

Closed
unforesndprson opened this issue Dec 24, 2020 · 0 comments · Fixed by #8460
Closed

使用第三方组件 vant-weapp, 绑定的事件名为kebab-case不生效 #8364

unforesndprson opened this issue Dec 24, 2020 · 0 comments · Fixed by #8460
Assignees
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@unforesndprson
Copy link

相关平台

微信小程序

复现仓库

https://github.com/unforesndprson/Taro3-issues-code.git
小程序基础库: 2.14.1
使用框架: Vue 3

复现步骤

1.打开小程序
2.点击"所有城市",未触发绑定事件

期望结果

第三方组件vant-weapp事件名为kebab-case时,@kebab-case可以正常使用

实际结果

@kebab-case 绑定的方法不执行

环境信息


  Taro CLI 3.0.21 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.19.0 - /usr/local/bin/node
      Yarn: 1.22.5 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.21 => 3.0.21 
      @tarojs/mini-runner: 3.0.21 => 3.0.21 
      @tarojs/runtime: 3.0.21 => 3.0.21 
      @tarojs/taro: 3.0.21 => 3.0.21 
      @tarojs/webpack-runner: 3.0.21 => 3.0.21 
      babel-preset-taro: 3.0.21 => 3.0.21 
      eslint-config-taro: 3.0.21 => 3.0.21 

补充信息

调试过程把@kebab-case的写法改成:onkebab-case时发现base.wxml的模版不会重新生成,不重新编译会存在旧代码。如下同时存在click-nav="{{i.clickNav}}" bindclick-nav="eh" :

<van-tree-select items="{{i.items}}" main-active-index="{{i.mainActiveIndex}}" active-id="{{i.activeId}}" click-nav="{{i.clickNav}}" bindclick-nav="eh"  id="{{i.uid}}">
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Dec 24, 2020
@luckyadam luckyadam self-assigned this Dec 28, 2020
@Chen-jj Chen-jj added this to the 3.0.23 milestone Jan 6, 2021
Chen-jj added a commit that referenced this issue Jan 6, 2021
1. 修复 react、vue、vue3 都不能使用 vant 的 kebab-case 事件的问题
2. 修复 vue3 使用第三方组件时事件绑定错误的问题
@Chen-jj Chen-jj linked a pull request Jan 6, 2021 that will close this issue
9 tasks
Chen-jj added a commit that referenced this issue Jan 7, 2021
* fix(runtime): 修复使用vant时一系列问题,fix #8407 #8242 #8364

1. 修复 react、vue、vue3 都不能使用 vant 的 kebab-case 事件的问题
2. 修复 vue3 使用第三方组件时事件绑定错误的问题

* fix: ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants