fix(Slider): format v-model with step correctly (#8893)

This commit is contained in:
neverland
2021-06-19 11:24:05 +08:00
committed by GitHub
parent 8c3d5a32cb
commit b9bca6a731
4 changed files with 35 additions and 12 deletions
+6
View File
@@ -37,3 +37,9 @@ export function formatNumber(
return value.replace(regExp, '');
}
// add num and avoid float number
export function addNumber(num1: number, num2: number) {
const cardinal = 10 ** 10;
return Math.round((num1 + num2) * cardinal) / cardinal;
}