From 613dd1a36dc83714dc949bfc067cac143270aef0 Mon Sep 17 00:00:00 2001 From: Zhi Cun Date: Fri, 17 May 2019 16:01:11 +0800 Subject: [PATCH] Progress: Revert pr #13198 (#15601) --- examples/docs/en-US/progress.md | 5 ++--- examples/docs/es/progress.md | 3 +-- examples/docs/zh-CN/progress.md | 3 +-- packages/progress/src/progress.vue | 14 +++++++------- test/unit/specs/progress.spec.js | 2 -- types/progress.d.ts | 2 +- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/examples/docs/en-US/progress.md b/examples/docs/en-US/progress.md index 3f686c1a3..d5c195f78 100644 --- a/examples/docs/en-US/progress.md +++ b/examples/docs/en-US/progress.md @@ -37,8 +37,7 @@ In this case the percentage takes no additional space. -Done -``` +``` ::: ### Attributes @@ -48,7 +47,7 @@ In this case the percentage takes no additional space. | type | the type of progress bar | string | line/circle | line | | stroke-width | the width of progress bar | number | — | 6 | | text-inside | whether to place the percentage inside progress bar, only works when `type` is 'line' | boolean | — | false | -| status | the current status of progress bar | string | success/exception/text | — | +| status | the current status of progress bar | string | success/exception | — | | color | background color of progress bar. Overrides `status` prop | string | — | — | | width | the canvas width of circle progress bar | number | — | 126 | | show-text | whether to show percentage | boolean | — | true | diff --git a/examples/docs/es/progress.md b/examples/docs/es/progress.md index aa044e9bf..3008fe926 100644 --- a/examples/docs/es/progress.md +++ b/examples/docs/es/progress.md @@ -35,7 +35,6 @@ En este caso el porcentage no toma espacio adicional. -Done ``` ::: @@ -46,7 +45,7 @@ En este caso el porcentage no toma espacio adicional. | type | tipo de barra de progreso | string | line/circle | line | | stroke-width | ancho de la barra de progreso | number | — | 6 | | text-inside | mostrar el porcentaje dentro de la barra de progreso, solo funciona cuando `type` es 'line' | boolean | — | false | -| status | estado actual de la barra de progreso | string | success/exception/text | — | +| status | estado actual de la barra de progreso | string | success/exception | — | | color | color de fondo de la barra de progreso. Sobreescribe la propiedad `status` | string | — | — | | width | ancho del canvas que contiene la barra de progreso circula | number | — | 126 | | show-text | mostrar porcentaje | boolean | — | true | diff --git a/examples/docs/zh-CN/progress.md b/examples/docs/zh-CN/progress.md index 8a4ef798b..6e8fb1283 100644 --- a/examples/docs/zh-CN/progress.md +++ b/examples/docs/zh-CN/progress.md @@ -40,7 +40,6 @@ -Done ``` ::: @@ -51,7 +50,7 @@ | type | 进度条类型 | string | line/circle | line | | stroke-width | 进度条的宽度,单位 px | number | — | 6 | | text-inside | 进度条显示文字内置在进度条内(只在 type=line 时可用) | boolean | — | false | -| status | 进度条当前状态 | string | success/exception/text | — | +| status | 进度条当前状态 | string | success/exception | — | | color | 进度条背景色(会覆盖 status 状态颜色) | string | — | — | | width | 环形进度条画布宽度(只在 type=circle 时可用) | number | | 126 | | show-text | 是否显示进度条文字内容 | boolean | — | true | diff --git a/packages/progress/src/progress.vue b/packages/progress/src/progress.vue index 2417eba06..e1337d851 100644 --- a/packages/progress/src/progress.vue +++ b/packages/progress/src/progress.vue @@ -27,12 +27,13 @@ -
+
- +
@@ -52,8 +53,7 @@ validator: val => val >= 0 && val <= 100 }, status: { - type: String, - validator: val => ['text', 'success', 'exception'].indexOf(val) > -1 + type: String }, strokeWidth: { type: Number, diff --git a/test/unit/specs/progress.spec.js b/test/unit/specs/progress.spec.js index 16a3380a7..3bb3f25b1 100644 --- a/test/unit/specs/progress.spec.js +++ b/test/unit/specs/progress.spec.js @@ -33,7 +33,6 @@ describe('Progress', () => { - Done ` }, true); @@ -46,7 +45,6 @@ describe('Progress', () => { expect(vm.$refs.circleSuccess.$el.querySelector('.el-progress__text .el-icon-check')).to.be.exist; expect(vm.$refs.circleException.$el.classList.contains('is-exception')).to.be.true; expect(vm.$refs.circleException.$el.querySelector('.el-progress__text .el-icon-close')).to.be.exist; - expect(vm.$refs.textException.$el.querySelector('.el-progress__text').innerText).to.be.equal('Done'); }); it('text inside', () => { vm = createVue({ diff --git a/types/progress.d.ts b/types/progress.d.ts index aff7f183a..933347c4b 100644 --- a/types/progress.d.ts +++ b/types/progress.d.ts @@ -1,7 +1,7 @@ import { ElementUIComponent } from './component' export type ProgressType = 'line' | 'circle' -export type ProgressStatus = 'success' | 'exception' | 'text' +export type ProgressStatus = 'success' | 'exception' /** Progress Component */ export declare class ElProgress extends ElementUIComponent {