movable-view动态修改direction没效果

发布于 8 年前作者 fcheng19330 次浏览最后编辑 8 年前来自 ask
<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 回复
xiulanmeng
xiulanmeng1 楼6 年前

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

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

xiuyingwu
xiuyingwu2 楼6 年前

动态改变这个值没用么