diff --git a/src/components/CountUp.vue b/src/components/CountUp.vue index 9ce68507f..3bd010759 100644 --- a/src/components/CountUp.vue +++ b/src/components/CountUp.vue @@ -1,5 +1,5 @@ @@ -37,6 +37,19 @@ export default { isNum() { return typeof this.value === "number"; }, + outputFixed() { + if (typeof this.output === "number") { + if (this.output < 1) { + return "<1"; + } else if (Number.isInteger(this.output)) { + return this.output; + } else { + return this.output.toFixed(2); + } + } else { + return this.output; + } + } }, watch: {