拖动组件movable-view 的bindchang 和bindscale 两个事件不生效
mac系统,100% 复现。
试了下windows和mac都没有问题,这个demo是将change事件bind到最后一个movable-view上的,如果确定是移动bind过事件的movable-view却没有回调的话,能否截个动图给我看下?
<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)
}
})