两个滑块的slider
发布于 6 年前 作者 lizeng 5192 次浏览 来自 问答

两个滑块的slider怎么弄?

9 回复

可以用 e.touches / e.changedTouches / wx.createSelectorQuery 来计算位置偏移。

试了一下你的代码,touchend和tap是有的(change事件目前还没有)。但要注意touchend和tap是没有e.detail.value的。

你好,没有内置的两滑块slider组件。你可以用movable-view自己实现一个。

touch类事件一点反应都没有

 <movable-area style=“height: 2rpx;width: 100%;background: #cdcdcd;margin-top:40rpx;”>

      <movable-view bindtouchend=“touchtap” bindchange=“changetap” bindtap=“tap” direction=“horizontal” style=“margin-top:-10rpx;height: 30rpx; width: 30rpx; border-radius:30rpx; background: red;”> </movable-view>  

      <movable-view bindtouchend=“touchtap” bindchange=“changetap” bindtap=“tap” direction=“horizontal” style=“margin-top:-10rpx;height: 30rpx; width: 30rpx; border-radius:30rpx; background: red;”> </movable-view>  

    </movable-area>

  changetap: function (e) {

    console.log(e.detail.value);

  },

  changetap: function (e) {

    console.log(e.detail.value);

  },

  touchtap: function () {

    console.log(e.detail.value);

  },

@楼主  有两个滑块的代码供参考下么

你好,touch类事件可用的。如果有问题,请详细描述问题并附上源代码

没办法获取到位置?

movable-view什么事件监听都没用,实现了样子,功能呢?

回到顶部