Skip to content

Commit

Permalink
[#722][3.0] Progress 컴포넌트 개발
Browse files Browse the repository at this point in the history
###############################
- 코드리뷰 피드백 후 스타일 변경
- 슬롯을 이용한 라벨 예제 추가
- 불필요한 코드 제거
  • Loading branch information
kdeun1 committed Nov 19, 2020
1 parent 55ea7cc commit 26f5b79
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
16 changes: 15 additions & 1 deletion docs/views/progress/example/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@
v-model="progressVal1"
color="#67C23A"
>
<p>{{ progressVal1 }} %</p>
<div class="label-cls">
<p>{{ progressVal1 }} %</p>
</div>
</ev-progress>
<br>
<ev-progress
v-model="progressVal1"
color="#F56C6C"
>
<div class="label-cls">
<p>{{ progressVal1 }} / 100</p>
</div>
</ev-progress>
<br>
<ev-progress
Expand Down Expand Up @@ -66,4 +77,7 @@ export default {
</script>

<style lang="scss">
.label-cls {
width: 70px;
}
</style>
6 changes: 3 additions & 3 deletions src/components/progress/Progress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default {
const innerStyle = computed(() => {
if (Array.isArray(props.color)) {
const sortedColorList = [...props.color].sort((curr, next) => curr.value - next.value);
console.log(sortedColorList);
let color = sortedColorList[0].color;
if (!props.modelValue) {
return {
Expand Down Expand Up @@ -132,8 +131,9 @@ export default {
}
&-label {
width: 55px;
text-align: center;
min-width: 55px;
text-align: right;
margin-left: 10px;
}
}
</style>

0 comments on commit 26f5b79

Please sign in to comment.