收藏
回答

【BUG】movable-view的out-of-bounds=true 无效

框架类型 问题类型 操作系统 工具版本
小程序 Bug macOS 2.4.0

- 当前 Bug 的表现(可附上截图)

    

    不能移动到movable-view外部!!!



- 预期表现


    移动到movable-view外部!!!


- 复现路径


- 提供一个最简复现 Demo

<movable-area style="height: 200px; width: 200px; background: darkgreen;">

    <movable-view

    style="height: {{height}}px; width: {{width}}px; background: red; top: {{top}}px; left: {{left}}px; transition: width .2s linear, height .2s linear, top .2s linear, left .2s linear;"

    x="50"

    y="50"

    direction="all"

    out-of-bounds="true"

    disabled="{{disabled}}"

    catch:longpress="long"

    catch:touchend="end"

    bindchange="onChange"

    ></movable-view>

</movable-area>


回答关注问题邀请回答
收藏

2 个回答

  • 张雷
    张雷
    2022-05-15

    我也遇到了这个问题,out-of-bounds=true和out-of-bounds=false没有任何差别。腾讯做事越来越不用心了。


    2022-05-15
    有用
    回复 1
    • Hello,Plante!
      Hello,Plante!
      2022-05-23
      这是一个大坑,因为没有设置movable-view的宽高,这玩意不会默认撑开盒子,所以组件边界判定是0,0。所以out-of-bounds=true和out-of-bounds=false没区别,你需要去设置宽高才行。
      2022-05-23
      回复
  • 灵芝
    灵芝
    2019-01-14

    麻烦提供出现问题的机型和微信版本,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    2019-01-14
    有用
    回复 4
    • 2019-01-14

      代码片段: https://developers.weixin.qq.com/s/gjb7zqmT7d5T

      复现:微信开发者工具:v1.02.1811150 (mac)

      手机机型:华为荣耀8 , 微信7.0.0版本


      2019-01-14
      回复
    • 灵芝
      灵芝
      2019-01-15回复

      是开发工具和真机都有问题?这边测试是正常的哦

      2019-01-15
      回复
    • 2019-01-15回复灵芝

      这个参数是不理解有偏差? 我认为out-of-bounds可以移动小红点到页面的任何位置,但是,我这边只能移动到贴着绿矩形边缘。


      2019-01-15
      回复
    • 灵芝
      灵芝
      2019-01-15回复

      不是任何位置哦,这个是正常的

      2019-01-15
      回复
登录 后发表内容