Поправил нейминг

This commit is contained in:
DwCay
2023-05-23 14:51:16 +03:00
parent 971ef269fe
commit 4094999953
2 changed files with 4 additions and 4 deletions

View File

@@ -51,7 +51,7 @@
import BaseInput from "@/components/base/BaseInput"; import BaseInput from "@/components/base/BaseInput";
import BaseInputContainer from "@/components/base/BaseInputContainer.vue"; import BaseInputContainer from "@/components/base/BaseInputContainer.vue";
import { ruleNumberInput } from "@/shared/utils/rulesInputs"; import { ruleNumberInput } from "@/shared/utils/rulesInputs";
import { roundedNumber } from "@/shared/utils/methodsObjects"; import { roundNumber } from "@/shared/utils/methodsObjects";
export default { export default {
name: "BaseInputNumber", name: "BaseInputNumber",
@@ -61,7 +61,7 @@ export default {
intervalId: 0, intervalId: 0,
timeoutId: 0, timeoutId: 0,
ruleNumberInput: [(val) => ruleNumberInput(val, this.max, this.min)], ruleNumberInput: [(val) => ruleNumberInput(val, this.max, this.min)],
roundedNumber: roundedNumber, roundNumber: roundNumber,
}; };
}, },
props: { props: {
@@ -182,7 +182,7 @@ export default {
}, },
watch: { watch: {
value(val) { value(val) {
this.value = this.roundedNumber(val, this.rounding); this.value = this.roundNumber(val, this.rounding);
}, },
}, },
computed: { computed: {

View File

@@ -1,4 +1,4 @@
export function roundedNumber(val, digits, rounded = "floor") { export function roundNumber(val, digits, rounded = "floor") {
let fraction = 10 * digits; let fraction = 10 * digits;
return fraction return fraction
? Math[rounded](val * fraction) / fraction ? Math[rounded](val * fraction) / fraction