Skip to content

Commit 613dd1a

Browse files
island205ziyoung
authored andcommitted
Progress: Revert pr #13198 (#15601)
1 parent 16a6059 commit 613dd1a

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

examples/docs/en-US/progress.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ In this case the percentage takes no additional space.
3737
<el-progress type="circle" :percentage="80" color="#8e71c7"></el-progress>
3838
<el-progress type="circle" :percentage="100" status="success"></el-progress>
3939
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
40-
<el-progress type="circle" :percentage="100" status="text">Done</el-progress>
41-
```
40+
```
4241
:::
4342

4443
### Attributes
@@ -48,7 +47,7 @@ In this case the percentage takes no additional space.
4847
| type | the type of progress bar | string | line/circle | line |
4948
| stroke-width | the width of progress bar | number || 6 |
5049
| text-inside | whether to place the percentage inside progress bar, only works when `type` is 'line' | boolean || false |
51-
| status | the current status of progress bar | string | success/exception/text ||
50+
| status | the current status of progress bar | string | success/exception ||
5251
| color | background color of progress bar. Overrides `status` prop | string |||
5352
| width | the canvas width of circle progress bar | number || 126 |
5453
| show-text | whether to show percentage | boolean || true |

examples/docs/es/progress.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ En este caso el porcentage no toma espacio adicional.
3535
<el-progress type="circle" :percentage="80" color="#8e71c7"></el-progress>
3636
<el-progress type="circle" :percentage="100" status="success"></el-progress>
3737
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
38-
<el-progress type="circle" :percentage="100" status="text">Done</el-progress>
3938
```
4039
:::
4140

@@ -46,7 +45,7 @@ En este caso el porcentage no toma espacio adicional.
4645
| type | tipo de barra de progreso | string | line/circle | line |
4746
| stroke-width | ancho de la barra de progreso | number || 6 |
4847
| text-inside | mostrar el porcentaje dentro de la barra de progreso, solo funciona cuando `type` es 'line' | boolean || false |
49-
| status | estado actual de la barra de progreso | string | success/exception/text ||
48+
| status | estado actual de la barra de progreso | string | success/exception ||
5049
| color | color de fondo de la barra de progreso. Sobreescribe la propiedad `status` | string |||
5150
| width | ancho del canvas que contiene la barra de progreso circula | number || 126 |
5251
| show-text | mostrar porcentaje | boolean || true |

examples/docs/zh-CN/progress.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<el-progress type="circle" :percentage="80" color="#8e71c7"></el-progress>
4141
<el-progress type="circle" :percentage="100" status="success"></el-progress>
4242
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
43-
<el-progress type="circle" :percentage="100" status="text">Done</el-progress>
4443
```
4544
:::
4645

@@ -51,7 +50,7 @@
5150
| type | 进度条类型 | string | line/circle | line |
5251
| stroke-width | 进度条的宽度,单位 px | number || 6 |
5352
| text-inside | 进度条显示文字内置在进度条内(只在 type=line 时可用) | boolean || false |
54-
| status | 进度条当前状态 | string | success/exception/text ||
53+
| status | 进度条当前状态 | string | success/exception ||
5554
| color | 进度条背景色(会覆盖 status 状态颜色) | string |||
5655
| width | 环形进度条画布宽度(只在 type=circle 时可用) | number | | 126 |
5756
| show-text | 是否显示进度条文字内容 | boolean || true |

packages/progress/src/progress.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
<path class="el-progress-circle__path" :d="trackPath" stroke-linecap="round" :stroke="stroke" :stroke-width="relativeStrokeWidth" fill="none" :style="circlePathStyle"></path>
2828
</svg>
2929
</div>
30-
<div class="el-progress__text" v-if="showText && !textInside" :style="{fontSize: progressTextSize + 'px'}">
30+
<div
31+
class="el-progress__text"
32+
v-if="showText && !textInside"
33+
:style="{fontSize: progressTextSize + 'px'}"
34+
>
3135
<template v-if="!status">{{percentage}}%</template>
32-
<template v-else>
33-
<slot v-if="status === 'text'"></slot>
34-
<i v-else :class="iconClass"></i>
35-
</template>
36+
<i v-else :class="iconClass"></i>
3637
</div>
3738
</div>
3839
</template>
@@ -52,8 +53,7 @@
5253
validator: val => val >= 0 && val <= 100
5354
},
5455
status: {
55-
type: String,
56-
validator: val => ['text', 'success', 'exception'].indexOf(val) > -1
56+
type: String
5757
},
5858
strokeWidth: {
5959
type: Number,

test/unit/specs/progress.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ describe('Progress', () => {
3333
<el-progress ref="lineException" :percentage="0" status="exception"></el-progress>
3434
<el-progress type="circle" ref="circleSuccess" :percentage="100" status="success"></el-progress>
3535
<el-progress type="circle" ref="circleException" :percentage="0" status="exception"></el-progress>
36-
<el-progress type="circle" ref="textException" :percentage="100" status="text">Done</el-progress>
3736
</div>
3837
`
3938
}, true);
@@ -46,7 +45,6 @@ describe('Progress', () => {
4645
expect(vm.$refs.circleSuccess.$el.querySelector('.el-progress__text .el-icon-check')).to.be.exist;
4746
expect(vm.$refs.circleException.$el.classList.contains('is-exception')).to.be.true;
4847
expect(vm.$refs.circleException.$el.querySelector('.el-progress__text .el-icon-close')).to.be.exist;
49-
expect(vm.$refs.textException.$el.querySelector('.el-progress__text').innerText).to.be.equal('Done');
5048
});
5149
it('text inside', () => {
5250
vm = createVue({

types/progress.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ElementUIComponent } from './component'
22

33
export type ProgressType = 'line' | 'circle'
4-
export type ProgressStatus = 'success' | 'exception' | 'text'
4+
export type ProgressStatus = 'success' | 'exception'
55

66
/** Progress Component */
77
export declare class ElProgress extends ElementUIComponent {

0 commit comments

Comments
 (0)