收藏
回答

拖动组件movable-view 事件不生效

框架类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 movable-view 工具 v1.02.1802270 1.9.1


拖动组件movable-view 的bindchang 和bindscale 两个事件不生效  

mac系统,100% 复现。

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

7 个回答

  • 小程序技术专员-june
    小程序技术专员-june
    2018-03-16

    额 小于1.9.90是不支持的……


    2018-03-16
    有用
    回复
  • 小程序技术专员-june
    小程序技术专员-june
    2018-03-16

    试了下windows和mac都没有问题,这个demo是将change事件bind到最后一个movable-view上的,如果确定是移动bind过事件的movable-view却没有回调的话,能否截个动图给我看下?

    2018-03-16
    有用
    回复
  • 小程序技术专员-june
    小程序技术专员-june
    2018-03-16

    没有复现,能否提供一下出问题的代码?

    2018-03-16
    有用
    回复
  • console.log(''码农永不秃头'')
    console.log(''码农永不秃头'')
    2018-03-16

    基础库 小于1.9.9

    2018-03-16
    有用
    回复
  • 箩灬卟
    箩灬卟
    2018-03-16

    基础库>=1.9.90吗

    2018-03-16
    有用
    回复
  • console.log(''码农永不秃头'')
    console.log(''码农永不秃头'')
    2018-03-16

    工具中,事件没有监听 ,不生效,真机调试 可以监听到, 测试 windows 和mac 系统。

    2018-03-16
    有用
    回复
  • console.log(''码农永不秃头'')
    console.log(''码农永不秃头'')
    2018-03-16

    <view class="section">

    <view class="section__title">movable-view区域小于movable-area</view>

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

    <movable-view style="height: 50px; width: 50px; background: blue;" x="{{x}}" y="{{y}}" direction="all">

    </movable-view>

    </movable-area>

    <view class="btn-area">

    <button size="mini" bindtap="tap">click me to move to (30px, 30px)</button>

    </view>

    <view class="section__title">movable-view区域大于movable-area</view>

    <movable-area style="height: 100px; width: 100px; background: red;">

    <movable-view style="height: 200px; width: 200px; background: blue;" direction="all">

    </movable-view>

    </movable-area>

    <view class="section__title">可放缩</view>

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

    <movable-view style="height: 50px; width: 50px; background: blue;" direction="all" bindchange="onChange" bindscale="onScale" scale scale-min="0.5" scale-max="4" scale-value="2">

    </movable-view>

    </movable-area>

    </view>





    Page({

    data: {

    x: 0,

    y: 0

    },

    tap: function (e) {

    this.setData({

    x: 30,

    y: 30

    });

    },

    onChange: function (e) {

    console.log(e.detail)

    },

    onScale: function (e) {

    console.log(e.detail)

    }

    })


    2018-03-16
    有用
    回复
登录 后发表内容