diff --git a/src/modules/lay.js b/src/modules/lay.js index 65dd2439..d4c3e3e0 100644 --- a/src/modules/lay.js +++ b/src/modules/lay.js @@ -568,9 +568,12 @@ var onStart = function(e){ if(e.touches.length !== 1) return; bindEvents(); + // 重置状态 state.timeStart = Date.now(); state.pointerStart.x = state.pointerEnd.x = e.touches[0].clientX; state.pointerStart.y = state.pointerEnd.y = e.touches[0].clientY; + state.distanceX = state.distanceY = 0; + state.direction = 'none' options.onTouchStart && options.onTouchStart(e, state); } diff --git a/src/modules/rate.js b/src/modules/rate.js index 7750a824..842a8080 100644 --- a/src/modules/rate.js +++ b/src/modules/rate.js @@ -253,6 +253,7 @@ layui.define(['jquery', 'lay'],function(exports){ // 更新最终值 options.value = score; + if(options.text) _ul.next("span").text(options.value + "星"); options.setText && options.setText(options.value); }, onTouchEnd: function(e, state){