两个滑块的slider

发布于 7 年前作者 lizeng5359 次浏览最后编辑 7 年前来自 ask

两个滑块的slider怎么弄?

9 回复
xiuyingchang
xiuyingchang1 楼6 年前

@

LastLeaf

panyang
panyang2 楼6 年前

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

zcao
zcao3 楼6 年前

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

yangzhang
yangzhang4 楼6 年前

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

jing96
jing965 楼6 年前

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);

  },

jingdong
jingdong6 楼6 年前

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

qlai
qlai7 楼6 年前

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

xiexiulan
xiexiulan8 楼6 年前

没办法获取到位置?

juanyin
juanyin9 楼5 年前

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