Merge pull request #451 from lochstar/progress-bar-slot
Added default slot to ProgressBarpull/457/head
commit
b740d5216d
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<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 && value && showValue" class="p-progressbar-label">{{value + '%'}}</div>
|
||||
<div v-if="determinate && value && showValue" class="p-progressbar-label">
|
||||
<slot>{{value + '%'}}</slot>
|
||||
</div>
|
||||
<div v-if="indeterminate" class="p-progressbar-indeterminate-container">
|
||||
<div class="p-progressbar-value p-progressbar-value-animate"></div>
|
||||
</div>
|
||||
|
|
|
@ -23,6 +23,14 @@ data() {
|
|||
<p>Indeterminate is simplly enabled using <i>mode</i> property.</p>
|
||||
<CodeHighlight>
|
||||
<ProgressBar mode="indeterminate"/>
|
||||
</CodeHighlight>
|
||||
|
||||
<h5>Slot</h5>
|
||||
<p>A custom label can be placed inside the progress bar via the default slot.</p>
|
||||
<CodeHighlight>
|
||||
<ProgressBar :value="value">
|
||||
Percent Complete
|
||||
</ProgressBar>
|
||||
</CodeHighlight>
|
||||
|
||||
<h5>Properties</h5>
|
||||
|
|
Loading…
Reference in New Issue