Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
613dd1a3
Commit
613dd1a3
authored
May 17, 2019
by
Zhi Cun
Committed by
hetech
May 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Progress: Revert pr #13198 (#15601)
parent
16a6059e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
17 deletions
+12
-17
examples/docs/en-US/progress.md
examples/docs/en-US/progress.md
+2
-3
examples/docs/es/progress.md
examples/docs/es/progress.md
+1
-2
examples/docs/zh-CN/progress.md
examples/docs/zh-CN/progress.md
+1
-2
packages/progress/src/progress.vue
packages/progress/src/progress.vue
+7
-7
test/unit/specs/progress.spec.js
test/unit/specs/progress.spec.js
+0
-2
types/progress.d.ts
types/progress.d.ts
+1
-1
No files found.
examples/docs/en-US/progress.md
View file @
613dd1a3
...
@@ -37,8 +37,7 @@ In this case the percentage takes no additional space.
...
@@ -37,8 +37,7 @@ In this case the percentage takes no additional space.
<el-progress
type=
"circle"
:percentage=
"80"
color=
"#8e71c7"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"80"
color=
"#8e71c7"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"success"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"success"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"50"
status=
"exception"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"50"
status=
"exception"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"text"
>
Done
</el-progress>
```
```
:::
:::
### Attributes
### Attributes
...
@@ -48,7 +47,7 @@ In this case the percentage takes no additional space.
...
@@ -48,7 +47,7 @@ In this case the percentage takes no additional space.
| type | the type of progress bar | string | line/circle | line |
| type | the type of progress bar | string | line/circle | line |
| stroke-width | the width of progress bar | number | — | 6 |
| 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 |
| 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 | — | — |
| color | background color of progress bar. Overrides
`status`
prop | string | — | — |
| width | the canvas width of circle progress bar | number | — | 126 |
| width | the canvas width of circle progress bar | number | — | 126 |
| show-text | whether to show percentage | boolean | — | true |
| show-text | whether to show percentage | boolean | — | true |
examples/docs/es/progress.md
View file @
613dd1a3
...
@@ -35,7 +35,6 @@ En este caso el porcentage no toma espacio adicional.
...
@@ -35,7 +35,6 @@ En este caso el porcentage no toma espacio adicional.
<el-progress
type=
"circle"
:percentage=
"80"
color=
"#8e71c7"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"80"
color=
"#8e71c7"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"success"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"success"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"50"
status=
"exception"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"50"
status=
"exception"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"text"
>
Done
</el-progress>
```
```
:::
:::
...
@@ -46,7 +45,7 @@ En este caso el porcentage no toma espacio adicional.
...
@@ -46,7 +45,7 @@ En este caso el porcentage no toma espacio adicional.
| type | tipo de barra de progreso | string | line/circle | line |
| type | tipo de barra de progreso | string | line/circle | line |
| stroke-width | ancho de la barra de progreso | number | — | 6 |
| 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 |
| 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 | — | — |
| 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 |
| width | ancho del canvas que contiene la barra de progreso circula | number | — | 126 |
| show-text | mostrar porcentaje | boolean | — | true |
| show-text | mostrar porcentaje | boolean | — | true |
examples/docs/zh-CN/progress.md
View file @
613dd1a3
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
<el-progress
type=
"circle"
:percentage=
"80"
color=
"#8e71c7"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"80"
color=
"#8e71c7"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"success"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"success"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"50"
status=
"exception"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"50"
status=
"exception"
></el-progress>
<el-progress
type=
"circle"
:percentage=
"100"
status=
"text"
>
Done
</el-progress>
```
```
:::
:::
...
@@ -51,7 +50,7 @@
...
@@ -51,7 +50,7 @@
| type | 进度条类型 | string | line/circle | line |
| type | 进度条类型 | string | line/circle | line |
| stroke-width | 进度条的宽度,单位 px | number | — | 6 |
| stroke-width | 进度条的宽度,单位 px | number | — | 6 |
| text-inside | 进度条显示文字内置在进度条内(只在 type=line 时可用) | boolean | — | false |
| text-inside | 进度条显示文字内置在进度条内(只在 type=line 时可用) | boolean | — | false |
| status | 进度条当前状态 | string | success/exception
/text
| — |
| status | 进度条当前状态 | string | success/exception | — |
| color | 进度条背景色(会覆盖 status 状态颜色) | string | — | — |
| color | 进度条背景色(会覆盖 status 状态颜色) | string | — | — |
| width | 环形进度条画布宽度(只在 type=circle 时可用) | number | | 126 |
| width | 环形进度条画布宽度(只在 type=circle 时可用) | number | | 126 |
| show-text | 是否显示进度条文字内容 | boolean | — | true |
| show-text | 是否显示进度条文字内容 | boolean | — | true |
packages/progress/src/progress.vue
View file @
613dd1a3
...
@@ -27,12 +27,13 @@
...
@@ -27,12 +27,13 @@
<path
class=
"el-progress-circle__path"
:d=
"trackPath"
stroke-linecap=
"round"
:stroke=
"stroke"
:stroke-width=
"relativeStrokeWidth"
fill=
"none"
:style=
"circlePathStyle"
></path>
<path
class=
"el-progress-circle__path"
:d=
"trackPath"
stroke-linecap=
"round"
:stroke=
"stroke"
:stroke-width=
"relativeStrokeWidth"
fill=
"none"
:style=
"circlePathStyle"
></path>
</svg>
</svg>
</div>
</div>
<div
class=
"el-progress__text"
v-if=
"showText && !textInside"
:style=
"
{fontSize: progressTextSize + 'px'}">
<div
class=
"el-progress__text"
v-if=
"showText && !textInside"
:style=
"
{fontSize: progressTextSize + 'px'}"
>
<template
v-if=
"!status"
>
{{
percentage
}}
%
</
template
>
<template
v-if=
"!status"
>
{{
percentage
}}
%
</
template
>
<
template
v-else
>
<i
v-else
:class=
"iconClass"
></i>
<slot
v-if=
"status === 'text'"
></slot>
<i
v-else
:class=
"iconClass"
></i>
</
template
>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -52,8 +53,7 @@
...
@@ -52,8 +53,7 @@
validator
:
val
=>
val
>=
0
&&
val
<=
100
validator
:
val
=>
val
>=
0
&&
val
<=
100
},
},
status
:
{
status
:
{
type
:
String
,
type
:
String
validator
:
val
=>
[
'
text
'
,
'
success
'
,
'
exception
'
].
indexOf
(
val
)
>
-
1
},
},
strokeWidth
:
{
strokeWidth
:
{
type
:
Number
,
type
:
Number
,
...
...
test/unit/specs/progress.spec.js
View file @
613dd1a3
...
@@ -33,7 +33,6 @@ describe('Progress', () => {
...
@@ -33,7 +33,6 @@ describe('Progress', () => {
<el-progress ref="lineException" :percentage="0" status="exception"></el-progress>
<el-progress ref="lineException" :percentage="0" status="exception"></el-progress>
<el-progress type="circle" ref="circleSuccess" :percentage="100" status="success"></el-progress>
<el-progress type="circle" ref="circleSuccess" :percentage="100" status="success"></el-progress>
<el-progress type="circle" ref="circleException" :percentage="0" status="exception"></el-progress>
<el-progress type="circle" ref="circleException" :percentage="0" status="exception"></el-progress>
<el-progress type="circle" ref="textException" :percentage="100" status="text">Done</el-progress>
</div>
</div>
`
`
},
true
);
},
true
);
...
@@ -46,7 +45,6 @@ describe('Progress', () => {
...
@@ -46,7 +45,6 @@ describe('Progress', () => {
expect
(
vm
.
$refs
.
circleSuccess
.
$el
.
querySelector
(
'
.el-progress__text .el-icon-check
'
)).
to
.
be
.
exist
;
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
.
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
.
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
'
,
()
=>
{
it
(
'
text inside
'
,
()
=>
{
vm
=
createVue
({
vm
=
createVue
({
...
...
types/progress.d.ts
View file @
613dd1a3
import
{
ElementUIComponent
}
from
'
./component
'
import
{
ElementUIComponent
}
from
'
./component
'
export
type
ProgressType
=
'
line
'
|
'
circle
'
export
type
ProgressType
=
'
line
'
|
'
circle
'
export
type
ProgressStatus
=
'
success
'
|
'
exception
'
|
'
text
'
export
type
ProgressStatus
=
'
success
'
|
'
exception
'
/** Progress Component */
/** Progress Component */
export
declare
class
ElProgress
extends
ElementUIComponent
{
export
declare
class
ElProgress
extends
ElementUIComponent
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment