Skip to content

Commit

Permalink
fix(Range): progress style (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
hylarucoder authored Jul 4, 2023
1 parent cd2b671 commit a79c165
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/runtime/components/forms/Range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,11 @@ export default defineComponent({
})
const progressStyle = computed(() => {
const { modelValue, min, max } = props
const clampedValue = Math.max(min, Math.min(modelValue, max))
const relativeValue = (clampedValue - min) / (max - min)
return {
width: `${(props.modelValue / props.max) * 100}%`
width: `${relativeValue * 100}%`
}
})
Expand Down

1 comment on commit a79c165

@vercel
Copy link

@vercel vercel bot commented on a79c165 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui-git-dev-nuxtlabs.vercel.app
ui-nuxtlabs.vercel.app
ui.nuxtlabs.com

Please sign in to comment.