zarm
Version:
基于 React 的移动端UI库
17 lines (13 loc) • 330 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getPrecision;
function getPrecision(step) {
var stepString = step.toString();
var precision = 0;
if (stepString.indexOf('.') >= 0) {
precision = stepString.length - stepString.indexOf('.') - 1;
}
return precision;
}
;