请问楼主 我设置了 x和y 却无法水平划动
<movable-area data-id=’{{item.recordtId}}’ data-index=’{{index}}’ bindtap=‘btnUp’ style=“width: 100%; height: 104px; padding-left: 100px; left: -100px; background-color: #ccc;”>
<movable-view inertia=“true” direction=“horizontal” x=“200” y=“0” style=“width: {{windowWidth}}px; height: 104px; background-color: #f00; z-index: 3;”>
</movable-view>
</movable-area>
windowWidth是我用 wx.getSystemInfoSync();获取的宽度
<movable-area catchtouchmove=“doNothing” style=“height:{{height}}px”>
<movable-view x="{{x}}" y="{{y}}" direction=“all” out-of-bounds=“false”>
</movable-view>
</movable-area>
<------------------------------------->
wx.getSystemInfo({
success: function (res) {
var height = res.screenHeight - (res.screenHeight - res.windowHeight);
if (res.platform == ‘ios’) {
height = height - 49;
} else if (res.platform == ‘android’) {
height = height + 46;
}
var tranX = (res.windowWidth - 0) * 0.82;
var tranY = height * 0.66;
that.setData({
x: tranX,
y: tranY,
height: height,
})
}
})