We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果最小值为0,最大值为10000,step为10,当我拖动最右面的滑块再往右面的时候,显示10050
The text was updated successfully, but these errors were encountered:
收到,v1.0.11版本解决了此问题。 formatNumber修改成下面的代码即可。
formatNumber(num, step) { //格式化数字,保留几位小数 let stepStr = '' + step; let index = stepStr.indexOf('.'); let len = index > -1 ? stepStr.length - index - 1 : 0; let offestNum = parseInt(1 + Array(('' + len).length + 1).join(0)) * 0.1; let tmpNum = num * offestNum; return ((parseInt(tmpNum / step + (step > 1 ? 1 : step) * 0.5) * step) / offestNum).toFixed(len); }
Sorry, something went wrong.
No branches or pull requests
如果最小值为0,最大值为10000,step为10,当我拖动最右面的滑块再往右面的时候,显示10050
The text was updated successfully, but these errors were encountered: