taro vue3 微信小程序 动态调整catch-move 无效

3ks5zfa0  于 2个月前  发布在  其他
关注(0)|答案(2)|浏览(34)

相关平台

微信小程序

复现仓库

https://github.com/tccer/demo-catch-move.git
小程序基础库: 3.3.3
使用框架: Vue 3

复现步骤

  1. 当 设置 :catch-move='fale' 或 :catch-move='true' 功能正常
  2. 设置 :catch-move='isLongPressed ' 则 log记录不到相关信息 (const isLongPressed = ref(false);)

期望结果

catch move 可以动态设置,并起到正确的拦截作用

实际结果

无效

环境信息

Taro CLI 3.6.24 environment info:
    System:
      OS: Windows 10 10.0.22621
    Binaries:
      Node: 18.16.0 - ~\AppData\Local\pnpm\node.EXE
      npm: 9.5.1 - ~\AppData\Local\pnpm\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.24 => 3.6.24
      @tarojs/components: 3.6.24 => 3.6.24
      @tarojs/helper: 3.6.24 => 3.6.24
      @tarojs/plugin-framework-vue3: 3.6.24 => 3.6.24
      @tarojs/plugin-html: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-alipay: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-h5: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-jd: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-qq: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-swan: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-tt: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-weapp: 3.6.24 => 3.6.24
      @tarojs/runtime: 3.6.24 => 3.6.24
      @tarojs/shared: 3.6.24 => 3.6.24
      @tarojs/taro: 3.6.24 => 3.6.24
      @tarojs/taro-loader: 3.6.24 => 3.6.24
      @tarojs/webpack5-runner: 3.6.24 => 3.6.24
      babel-preset-taro: 3.6.24 => 3.6.24
      eslint-config-taro: 3.6.24 => 3.6.24
h9vpoimq

h9vpoimq1#

试试 不要在 longpress 事件里面动态调整catch-move ,比如单独一个按钮,点击这个按钮后 isLongPressed.value = true;

相关问题