update TimePicker

update TimePicker
This commit is contained in:
梁灏 2016-12-27 17:41:35 +08:00
parent 2dbbd7dea6
commit af713093ab
6 changed files with 62 additions and 10 deletions

View file

@ -144,7 +144,7 @@ export function scrollTop(el, from = 0, to, duration = 500) {
function (callback) {
return window.setTimeout(callback, 1000/60);
}
)
);
}
const difference = Math.abs(from - to);
const step = Math.ceil(difference / duration * 50);