From 8a6e41dcd944a26eecd99bfb0d79c35fc00a0a2d Mon Sep 17 00:00:00 2001 From: GMrrc <143954951+GMrrc@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:24:33 +0100 Subject: [PATCH] Update ProgressBar.vue --- src/components/ProgressBar.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ProgressBar.vue b/src/components/ProgressBar.vue index 60ce9c4..49d31d8 100644 --- a/src/components/ProgressBar.vue +++ b/src/components/ProgressBar.vue @@ -17,7 +17,6 @@ value: { type: Number, required: true, - validator: (v) => v >= 0 && v <= 100, }, label: { type: String, @@ -28,6 +27,11 @@ default: "bg-blue-500", }, }, + computed: { + clampedValue() { + return Math.max(0, Math.min(this.value, 100)); + }, + }, };