Refactor #3965 - Fixes for ProgressBar
parent
641f6a0e11
commit
05f2958c74
|
@ -114,15 +114,16 @@ const styles = `
|
|||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ props, instance }) => [
|
||||
root: ({ instance }) => [
|
||||
'p-progressbar p-component',
|
||||
{
|
||||
'p-progressbar-determinate': instance.determinate,
|
||||
'p-progressbar-indeterminate': instance.indeterminate
|
||||
}
|
||||
],
|
||||
value: ({ instance }) => (instance.determinate ? 'p-progressbar-value p-progressbar-value-animate' : 'p-progressbar-indeterminate-container'),
|
||||
label: ({ instance }) => (instance.determinate ? 'p-progressbar-label' : 'p-progressbar-value p-progressbar-value-animate')
|
||||
container: 'p-progressbar-indeterminate-container',
|
||||
value: 'p-progressbar-value p-progressbar-value-animate',
|
||||
label: 'p-progressbar-label'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_progressbar_style', manual: true });
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')" data-pc-name="progressbar">
|
||||
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')">
|
||||
<div v-if="determinate" :class="cx('value')" :style="progressStyle" v-bind="ptm('value')">
|
||||
<div v-if="value != null && value !== 0 && showValue" :class="cx('label')" v-bind="ptm('label')">
|
||||
<slot>{{ value + '%' }}</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="indeterminate" :class="cx('value')" v-bind="ptm('value')">
|
||||
<div :class="cx('label')" v-bind="ptm('label')"></div>
|
||||
<div v-if="indeterminate" :class="cx('container')" v-bind="ptm('root')">
|
||||
<div :class="cx('value')" v-bind="ptm('value')"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue