Merge 1cb4d281ec into 3eaef4a748
This commit is contained in:
commit
dc0f3d2ded
|
|
@ -44,6 +44,6 @@ import { Progress } from '@/components/ui/progress'
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Progress :model-value="33" />
|
||||
<Progress :model-value="33" :max="50" />
|
||||
</template>
|
||||
```
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const props = withDefaults(
|
|||
defineProps<ProgressRootProps & { class?: HTMLAttributes['class'] }>(),
|
||||
{
|
||||
modelValue: 0,
|
||||
max: 100
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ const delegatedProps = computed(() => {
|
|||
>
|
||||
<ProgressIndicator
|
||||
class="h-full w-full flex-1 bg-primary transition-all"
|
||||
:style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
|
||||
:style="`transform: translateX(-${100 - (props.modelValue ?? 0) * 100 / props.max}%);`"
|
||||
/>
|
||||
</ProgressRoot>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const props = withDefaults(
|
|||
defineProps<ProgressRootProps & { class?: HTMLAttributes['class'] }>(),
|
||||
{
|
||||
modelValue: 0,
|
||||
max: 100
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ const delegatedProps = computed(() => {
|
|||
>
|
||||
<ProgressIndicator
|
||||
class="h-full w-full flex-1 bg-primary transition-all"
|
||||
:style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
|
||||
:style="`transform: translateX(-${100 - (props.modelValue ?? 0) * 100 / props.max}%);`"
|
||||
/>
|
||||
</ProgressRoot>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user