-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add progress component of harmony * feat: add progress component css empty line * feat: change props question of progress in harmony * feat: change color question of progress * feat(harmony): change color rename of progress * feat(harmony): change progress params * fix: change progress com * fix: delete cls of progress Co-authored-by: huozhongyi <[email protected]>
- Loading branch information
1 parent
7ea95fa
commit 8779d26
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/taro-harmony/src/components/components-harmony/progress/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.progress-horizontal-showInfo { | ||
flex-direction: row; | ||
align-items: center; | ||
height: 100px; | ||
} |
28 changes: 28 additions & 0 deletions
28
packages/taro-harmony/src/components/components-harmony/progress/index.hml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<div class="progress"> | ||
<div | ||
if="{{showInfo && type == 'horizontal'}}" | ||
class="progress-horizontal-showInfo" | ||
style="height: 100px;" | ||
> | ||
<progress | ||
style="color: {{progressColor}};background-color:{{progressBgColor}};stroke-width:{{strokeWidth}}" | ||
type="{{type}}" | ||
percent="{{percent}}" | ||
secondarypercent="{{secondarypercent}}" | ||
clockwise="{{clockwise}}" | ||
> | ||
</progress> | ||
<text | ||
style="font-size: {{fontSize}};width: 80px; text-align: center;" | ||
>{{percent}}%</text> | ||
</div> | ||
<progress | ||
else | ||
style="color: {{progressColor}};background-color:{{progressBgColor}};stroke-width:{{strokeWidth}}" | ||
type="{{type}}" | ||
percent="{{percent}}" | ||
secondarypercent="{{secondarypercent}}" | ||
clockwise="{{clockwise}}" | ||
> | ||
</progress> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
packages/taro-harmony/src/components/components-harmony/progress/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { covertHex3ToHex6 } from '../utils' | ||
|
||
export default { | ||
props: [ | ||
'type', | ||
'percent', | ||
'secondarypercent', | ||
'clockwise', | ||
'showInfo', | ||
'fontSize', | ||
'strokeWidth', | ||
'activeColor', | ||
'backgroundColor' | ||
], | ||
computed: { | ||
progressColor () { | ||
return covertHex3ToHex6(this.activeColor) | ||
}, | ||
progressBgColor () { | ||
return covertHex3ToHex6(this.backgroundColor) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters