Fixed #1272 - ProgressBar does not show zero percent

pull/1361/head
Tuğçe Küçükoğlu 2021-06-23 16:07:45 +03:00
parent 679cf8f766
commit e4d83d48c6
1 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div role="progressbar" :class="containerClass" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100"> <div role="progressbar" :class="containerClass" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100">
<div v-if="determinate" class="p-progressbar-value p-progressbar-value-animate" :style="progressStyle"></div> <div v-if="determinate" class="p-progressbar-value p-progressbar-value-animate" :style="progressStyle"></div>
<div v-if="determinate && value && showValue" class="p-progressbar-label"> <div v-if="determinate && (value !== null) && showValue" class="p-progressbar-label">
<slot>{{value + '%'}}</slot> <slot>{{value + '%'}}</slot>
</div> </div>
<div v-if="indeterminate" class="p-progressbar-indeterminate-container"> <div v-if="indeterminate" class="p-progressbar-indeterminate-container">
@ -14,7 +14,10 @@
export default { export default {
name: 'ProgressBar', name: 'ProgressBar',
props: { props: {
value: Number, value: {
type: Number,
default: null
},
mode: { mode: {
type: String, type: String,
default: 'determinate' default: 'determinate'