Progress
작업의 진행 정도를 막대형, 원형, 대시보드형으로 보여주는 컴포넌트예요. 백분율 하나로 완료율을 표시하거나, 여러 원을 겹쳐 다중 지표를 나타낼 수도 있어요. 그라디언트 색과 커스텀 표시기(indicator)도 지원하죠.
출처: 문서
본문
할 말은 없지만, 레이아웃이 넓어 보이도록 placeholder는 있어야 하죠.
Demos
circle.vue
line.vue
circle-offset.vue
multiple-circle.vue
dashboard.vue
custom-indicator.vue
color.vue
no-indicator.vue
height.vue
processing.vue
gradient.vue
API
Progress Props
| 이름 | 타입 | 기본값 | 설명 | 버전 |
|---|---|---|---|---|
| border-radius | number | string |
undefined |
'line' 타입 progress의 border-radius. 넣지 않으면 기본 높이의 절반을 유지해요. |
|
| circle-gap | number |
1 |
타입이 'multiple-circle'일 때 원 사이의 간격. viewbox 크기를 100이라고 가정해요. |
|
| color | string | string[] | { stops: string[] } | Array<{ stops: string[] }> |
undefined |
progress 색. { stops: string[] }는 그라디언트 색을 뜻해요. stops 배열의 길이는 2여야 해요. 첫 번째 요소는 그라디언트 시작 색, 두 번째 요소는 그라디언트 끝 색이에요. |
stops는 2.40.2부터 |
| fill-border-radius | number | string |
undefined |
'line' 타입 progress의 fill border-radius. 넣지 않으면 border-radius를 유지해요. |
|
| gap-degree | number |
75 |
반원의 gap 각도, 0 ~ 360. | 2.25.2 |
| gap-offset-degree | number |
0 |
gap offset 각도. | 2.25.2 |
| height | number |
undefined |
'line' 타입 progress의 높이. 넣지 않으면 기본 높이를 유지해요. |
|
| indicator-placement | 'inside' | 'outside' |
'outside' |
표시기(indicator)의 배치. | |
| indicator-text-color | string |
undefined |
표시기 텍스트의 색. | |
| offset-degress | number |
0 |
원형 progress의 offset 각도. circle 타입 progress에서만 동작해요. |
2.24.0 |
| percentage | number | number[] |
0 |
백분율 값. | |
| processing | boolean |
false |
처리 중 상태. | |
| rail-color | string | string[] |
undefined |
레일 색. | |
| rail-style | string | CSS | Array<string | CSS> |
undefined |
레일 style. | |
| show-indicator | boolean |
true |
표시기를 표시할지 여부. | |
| status | 'default' | 'success' | 'error' | 'warning' | 'info' |
'default' |
progress 상태. | |
| stroke-width | number |
7 |
progress 너비. | |
| type | 'line' | 'circle' | 'multiple-circle' | 'dashboard' |
line |
progress 타입. | 'dashboard' 2.25.2 |
| unit | string |
% |
progress 단위. |
Progress Slots
| 이름 | 매개변수 | 설명 |
|---|---|---|
| default | () |
콘텐츠는 기본 표시기 콘텐츠를 대체해요. |
더 알아보기 (Learn more)
업로드나 처리 중 상태를 표현할 때는 processing prop을 함께 써요. 여러 지표를 한 화면에 보여주는 방법은 multiple-circle 데모를 참고하세요.