<canvas @touchmove="onTouchmove"></canvas>
<script lang="ts" setup>
function onTouchmove(e){
console.log(e)
}
</script>
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windows11
浏览器平台: Chrome
浏览器版本: 119.0.6045.160
项目创建方式: CLI
CLI版本号: 3.0.0-alpha-3061020221121002
<canvas @touchmove="onTouchmove"></canvas>
<script lang="ts" setup>
function onTouchmove(e){
console.log(e)
}
</script>
把上方示例放置vue页面编译至h5端触摸移动报错。
正常绘制签名
报错
canvas只要绑定触摸事件,开始点击、滑动就报错
Uncaught TypeError: $event.currentTarget.getBoundingClientRect is not a function
at null:7312:45
at null:9693:60
at callWithErrorHandling (null:1336:22)
at callWithAsyncErrorHandling (null:1345:21)
at HTMLElement.invoker (null:9672:17)
5***@qq.com (作者)
升级依赖报错
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: uni-preset-vue@0.0.0
npm ERR! Found: @dcloudio/vite-plugin-uni@3.0.0-alpha-3061020221121002
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3090820231120001" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3090820231120001" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite@4.0.3
npm ERR! node_modules/vite
npm ERR! peer vite@"^4.0.0" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3090820231120001
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3090820231120001" from the root project
2023-11-30 15:32
5***@qq.com (作者)
大佬,请问你用bug代码是怎么升级依赖的呢?我选择npm报错依赖冲突,选择pnpm后启动项目报错
2023-11-30 15:35
YUANRJ
回复 5***@qq.com: node版本多少?使用yarn安装试试
2023-11-30 16:20
5***@qq.com (作者)
回复 YUANRJ: node版本18.19.0 使用yarn和pnpm一样,项目启动报错
2023-11-30 17:16