Commit 8902032e authored by yun's avatar yun

细节修改

parent 1439cd21
......@@ -193,7 +193,7 @@ export default {
}
// 判断当前移动距离特别小,判定为触碰事件,而不是滑动
console.log(distance, interval, 'LLLLLLLLLLLLLLLLLLLLLLLLLLL')
if (distance <= 1) {
if (distance < 1) {
// e.path 保存了触发当前事件的源数组、0号元素代表当前点击的option
// 通过当前点击的元素的offsetTop计算当前元素正确的索引值
activeIndex = Math.round((e.path[0].offsetTop - this.optionHeight * 2) / this.optionHeight)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment