NervJS / taro3-vant-sample

Taro3 中使用 vant-weapp 的示例
42 stars 8 forks source link

有没有taro3 + vue3 使用vant的例子呢,事件绑定要写2个,bindtap和@tap #3

Open chenchaoc opened 3 years ago

chenchaoc commented 3 years ago

有没有taro3 + vue3 使用vant的例子呢,事件绑定要写2个,bindtap和@tap才能正确触发...

运行环境 "@babel/runtime": "^7.7.7", "@tarojs/components": "3.0.15", "@tarojs/runtime": "3.0.15", "@tarojs/taro": "3.0.15", "@vant/weapp": "^1.6.0", "vue": "^3.0.0"

代码要这样写才触发

    <view class="pd-16">
      <van-button
        :block="true"
        :round="true"
        type="danger"
        @tap="dj2"
        bindtap="dj2">我点击了</van-button>
    </view>
    <van-cell-group>
      <van-cell title="单元格" value="内容" @tap="dj" bindtap="dj" />
      <van-cell title="单元格" :center="true" value="内容" label="描述信息" />
    </van-cell-group>
Mikasa33 commented 3 years ago

https://github.com/NervJS/taro/issues/8242#issue-761135052