<movable-area class=‘mian1’ >
<movable-view class=‘mian1_move’ direction=“all” inertia=“true” bindchange=“onChange” animation="{{move_animation}}">
text</movable-view>
</movable-area>
data: {
move_animation: “”,
}
onChange(e) {
console.log(e.detail)
var that=this
if (e.detail.source == “friction”){
setTimeout(function(){
var move_animation = wx.createAnimation({
duration: 500,
timingFunction: “linear”,
})
that.animation = move_animation
move_animation.opacity(0).step()
that.setData({
move_animation: move_animation.export()
})
console.log(111)
},400)
}
},
console.log能打印多次