parent
5ffaf9ec41
commit
3f45de366c
@ -0,0 +1,34 @@
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
"show_info":{
|
||||
type:Boolean,
|
||||
value: false
|
||||
},
|
||||
"border_radius":Number,
|
||||
"font_size":{
|
||||
type:Number,
|
||||
value:16
|
||||
},
|
||||
"stroke_width":{
|
||||
type:Number,
|
||||
value:6
|
||||
},
|
||||
backgroundColor:{
|
||||
type:String,
|
||||
value:"#EBEBEB"
|
||||
},
|
||||
value:Array
|
||||
},
|
||||
|
||||
data: {
|
||||
|
||||
},
|
||||
attached(){
|
||||
this.setData({data:JSON.stringify(this.data)});
|
||||
console.log(this.data);
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<view class="progress-wrap">
|
||||
<view class="progress-container" style="border-radius:{{border_radius}}px;font-size:{{font_size}}px;background:{{backgroundColor}};height:{{stroke_width}}px">
|
||||
<view wx:for="{{value}}" style="background:{{item.color}};z-index:{{item.z-index||index}};width:{{item.percent}}%" class="progress-item"></view>
|
||||
</view>
|
||||
<slot />
|
||||
</view>
|
@ -0,0 +1,14 @@
|
||||
.progress-wrap{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.progress-container{
|
||||
flex: auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-item{
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
<view class="exercise-item" bindtap="onTap">
|
||||
<view class="title">
|
||||
<text>{{data.exercise_name}}</text>
|
||||
<view>
|
||||
<text class="title">{{data.exercise_name}}</text><text class="tip" style="{{item=='已截止'||item=='已结束'?'background:#FC2B6A':''}}" wx:for="{{data.exercise_tips}}">{{item}}</text>
|
||||
</view>
|
||||
<view class="status">
|
||||
<text wx:if="{{data.exercise_left_time}}" class="left-time">还剩{{data.exercise_left_time}}截止</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="tip" wx:for="{{data.exercise_tips}}">{{item}}</text>
|
||||
<view wx:if="{{data.exercise_status>1}}">
|
||||
<progress border-radius="8" percent="{{data.exercise_answer/(data.exercise_answer+data.exercise_unanswer)*100}}" activeColor="#00b0f0" backgroundColor="lightgrey"><text class="commit-text">完成:{{data.exercise_answer}}/{{data.exercise_answer+data.exercise_unanswer}}</text></progress>
|
||||
</view>
|
||||
</view>
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"muti-progress":"../../../components/muti-progress/muti-progress"
|
||||
}
|
||||
}
|
Loading…
Reference in new issue