diff --git a/docs/markdown/en/progress.md b/docs/markdown/en/progress.md index d2f91a2..e732b77 100644 --- a/docs/markdown/en/progress.md +++ b/docs/markdown/en/progress.md @@ -68,6 +68,16 @@ Click the buttons below to see the transition of progress. ``` ::: +## Indeterminate + +Progress bar has an indeterminate state, that animates forever. + +:::demo +```html + +``` +::: + ## Progress Props | Property | Description | Type | Accepted Values | Default | @@ -75,6 +85,7 @@ Click the buttons below to see the transition of progress. | percent | the percentage of Progress | Number | - | 0 | | status | the status of Progress | String | `success`, `error` | - | | stroke-width | the width of Progress Bar | Number | - | 8 | +| indeterminate | the width of Progress Bar | Boolean | `true`, `false` | `false` | ## Progress Events diff --git a/src/components/progress/src/progress.vue b/src/components/progress/src/progress.vue index f65168b..c4ff341 100644 --- a/src/components/progress/src/progress.vue +++ b/src/components/progress/src/progress.vue @@ -11,11 +11,12 @@
-
-
+
+
-
+
{{ percent }}%
@@ -40,12 +41,15 @@ export default { percent: { type: Number, default: 0, - required: true, validator: val => val >= 0 && val <= 100 }, strokeWidth: { type: Number, default: 8 + }, + indeterminate: { + type: Boolean, + default: false } }, data () { @@ -61,6 +65,11 @@ export default { }, statusIconClass () { return this.currentStatus === 'success' ? 'icon-check-circle' : 'icon-x-circle' + }, + progresStyle () { + return { + width: `${this.percent}%` + } } }, watch: {