movable-view动态修改direction没效果
发布于 7 年前 作者 fcheng 19270 次浏览 来自 问答
<movable-view x="50" y="50" style="width:400rpx;height:400rpx;" direction="{{moveOn?'none':'all'}}">
  <view class="move" catchtouchstart="moveS" catchtouchend="moveE"></view>
</movable-view>
moveS:function(){
  var that = this;
  that.setData({
    moveOn:true
  });
},
moveE:function(){
  var that = this;
  that.setData({
    moveOn:false
  });
},

当 direction为none时  还是可以移动

2 回复

最新版,动态修改没有用:

direction="{{item.uiShowTextContent? ‘none’:‘all’}}"

动态改变这个值没用么

回到顶部