uni-app canvas 触发不了touch事件

uni-app canvas 触发不了touch事件 微信开发者工具中能正常触发,但是真机扫码触发不了。直接使用微信原生代码能正常触发

属性
版本号 ^3.0.0-alpha-3030720220111003
<template>  
  <view class="page">  
    <canvas id="cs" type="2d" @touchstart="onTouchStart"></canvas>  
  </view>  
</template>  

<script lang="ts">  
import { defineComponent } from 'vue'  

export default defineComponent({  
  methods: {  
    onTouchStart() {  
      uni.showToast({ title: 'touch start', icon: 'none' });  
    },  
  }  
});  
</script>

更多关于uni-app canvas 触发不了touch事件的实战教程也可以访问 https://www.itying.com/category-93-b0.html

8 回复

已修复,cli更新至:3.0.0-alpha-3030820220114006

更多关于uni-app canvas 触发不了touch事件的实战教程也可以访问 https://www.itying.com/category-93-b0.html


非常感谢

现在看只有这个版本是没有问题的,升级后续新版本问题还是存在是为什么呢,以后都不能升级只能锁在这个版本了吗?

回复 4***@qq.com: 你确认锁定最新的版本,也有问题?

vue2 正常吗?

vite + vue3 遇到同样问题,开发者工具没有问题,真机测试所有touch时间都不能触发,tap可触发
版本号:^3.0.0-alpha-3030920220121001
vue2 开发者工具和真机测试都没有问题

这个问题影响还是挺大的,之前vue2没问题,项目迁移vue3重构遇到这个问题卡主了,下一个版本能修复吗?

回到顶部