Skip to content

Commit

Permalink
feat(module: progress): nzm-progress supports percent larger than 100% (
Browse files Browse the repository at this point in the history
  • Loading branch information
fisherspy authored and Guoyuanqiang committed Dec 11, 2018
1 parent a0798eb commit 021f7d8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/progress/progress.component.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="{{prefixCls}}-bar" [ngStyle]="barStyle" [style.width.%]="percent"></div>
<div class="{{prefixCls}}-bar" [ngStyle]="barStyle" [style.width.%]="(percent <= 100) ? percent : (10000 / percent)"></div>
3 changes: 3 additions & 0 deletions components/progress/progress.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export class ProgressComponent {
get value(): number {
return this.percent;
}

@HostBinding('class.am-progress')
amProgress: boolean = true;
@HostBinding('class.am-progress-outer')
outer: boolean = true;
@HostBinding('class.am-progress-fixed-outer')
Expand Down
14 changes: 10 additions & 4 deletions components/progress/style/addon.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ progress::-webkit-progress-value {
position: relative;
}
.@{pickerPrefixClass} {
display: block;
&-outer {
background-color: @border-color-base;
}
&-outer&-hide-outer {
background-color: transparent;
}
&-outer&-exceedance {
background-color: @brand-warning;
}
&-hide-outer::-webkit-progress-bar {
background-color: transparent;
}
}

.@{pickerPrefixClass} {
display: block;
}

0 comments on commit 021f7d8

Please sign in to comment.