File tree Expand file tree Collapse file tree 6 files changed +12
-17
lines changed Expand file tree Collapse file tree 6 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ In this case the percentage takes no additional space.
37
37
<el-progress type =" circle" :percentage =" 80" color =" #8e71c7" ></el-progress >
38
38
<el-progress type =" circle" :percentage =" 100" status =" success" ></el-progress >
39
39
<el-progress type =" circle" :percentage =" 50" status =" exception" ></el-progress >
40
- <el-progress type =" circle" :percentage =" 100" status =" text" >Done</el-progress >
41
- ```
40
+ ```
42
41
:::
43
42
44
43
### Attributes
@@ -48,7 +47,7 @@ In this case the percentage takes no additional space.
48
47
| type | the type of progress bar | string | line/circle | line |
49
48
| stroke-width | the width of progress bar | number | — | 6 |
50
49
| 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 | — |
52
51
| color | background color of progress bar. Overrides ` status ` prop | string | — | — |
53
52
| width | the canvas width of circle progress bar | number | — | 126 |
54
53
| show-text | whether to show percentage | boolean | — | true |
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ En este caso el porcentage no toma espacio adicional.
35
35
<el-progress type =" circle" :percentage =" 80" color =" #8e71c7" ></el-progress >
36
36
<el-progress type =" circle" :percentage =" 100" status =" success" ></el-progress >
37
37
<el-progress type =" circle" :percentage =" 50" status =" exception" ></el-progress >
38
- <el-progress type =" circle" :percentage =" 100" status =" text" >Done</el-progress >
39
38
```
40
39
:::
41
40
@@ -46,7 +45,7 @@ En este caso el porcentage no toma espacio adicional.
46
45
| type | tipo de barra de progreso | string | line/circle | line |
47
46
| stroke-width | ancho de la barra de progreso | number | — | 6 |
48
47
| 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 | — |
50
49
| color | color de fondo de la barra de progreso. Sobreescribe la propiedad ` status ` | string | — | — |
51
50
| width | ancho del canvas que contiene la barra de progreso circula | number | — | 126 |
52
51
| show-text | mostrar porcentaje | boolean | — | true |
Original file line number Diff line number Diff line change 40
40
<el-progress type =" circle" :percentage =" 80" color =" #8e71c7" ></el-progress >
41
41
<el-progress type =" circle" :percentage =" 100" status =" success" ></el-progress >
42
42
<el-progress type =" circle" :percentage =" 50" status =" exception" ></el-progress >
43
- <el-progress type =" circle" :percentage =" 100" status =" text" >Done</el-progress >
44
43
```
45
44
:::
46
45
51
50
| type | 进度条类型 | string | line/circle | line |
52
51
| stroke-width | 进度条的宽度,单位 px | number | — | 6 |
53
52
| text-inside | 进度条显示文字内置在进度条内(只在 type=line 时可用) | boolean | — | false |
54
- | status | 进度条当前状态 | string | success/exception/text | — |
53
+ | status | 进度条当前状态 | string | success/exception | — |
55
54
| color | 进度条背景色(会覆盖 status 状态颜色) | string | — | — |
56
55
| width | 环形进度条画布宽度(只在 type=circle 时可用) | number | | 126 |
57
56
| show-text | 是否显示进度条文字内容 | boolean | — | true |
Original file line number Diff line number Diff line change 27
27
<path class =" el-progress-circle__path" :d =" trackPath" stroke-linecap =" round" :stroke =" stroke" :stroke-width =" relativeStrokeWidth" fill =" none" :style =" circlePathStyle" ></path >
28
28
</svg >
29
29
</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
+ >
31
35
<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 >
36
37
</div >
37
38
</div >
38
39
</template >
52
53
validator : val => val >= 0 && val <= 100
53
54
},
54
55
status: {
55
- type: String ,
56
- validator : val => [' text' , ' success' , ' exception' ].indexOf (val) > - 1
56
+ type: String
57
57
},
58
58
strokeWidth: {
59
59
type: Number ,
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ describe('Progress', () => {
33
33
<el-progress ref="lineException" :percentage="0" status="exception"></el-progress>
34
34
<el-progress type="circle" ref="circleSuccess" :percentage="100" status="success"></el-progress>
35
35
<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>
37
36
</div>
38
37
`
39
38
} , true ) ;
@@ -46,7 +45,6 @@ describe('Progress', () => {
46
45
expect ( vm . $refs . circleSuccess . $el . querySelector ( '.el-progress__text .el-icon-check' ) ) . to . be . exist ;
47
46
expect ( vm . $refs . circleException . $el . classList . contains ( 'is-exception' ) ) . to . be . true ;
48
47
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' ) ;
50
48
} ) ;
51
49
it ( 'text inside' , ( ) => {
52
50
vm = createVue ( {
Original file line number Diff line number Diff line change 1
1
import { ElementUIComponent } from './component'
2
2
3
3
export type ProgressType = 'line' | 'circle'
4
- export type ProgressStatus = 'success' | 'exception' | 'text'
4
+ export type ProgressStatus = 'success' | 'exception'
5
5
6
6
/** Progress Component */
7
7
export declare class ElProgress extends ElementUIComponent {
You can’t perform that action at this time.
0 commit comments