Showing
1 changed file
with
13 additions
and
2 deletions
| @@ -49,6 +49,10 @@ struct Index { | @@ -49,6 +49,10 @@ struct Index { | ||
| 49 | 49 | ||
| 50 | EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_TITLe, (val:string | undefined) => { | 50 | EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_TITLe, (val:string | undefined) => { |
| 51 | this.audioTitle = val | 51 | this.audioTitle = val |
| 52 | + // 播放稿件修改时进度条清零 | ||
| 53 | + this.progressVal = 0 | ||
| 54 | + this.currentTime = '00:00' | ||
| 55 | + this.totalTime = '00:00' | ||
| 52 | }) | 56 | }) |
| 53 | 57 | ||
| 54 | EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (val: number | string | undefined) => { | 58 | EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (val: number | string | undefined) => { |
| @@ -98,13 +102,20 @@ struct Index { | @@ -98,13 +102,20 @@ struct Index { | ||
| 98 | 102 | ||
| 99 | build() { | 103 | build() { |
| 100 | Stack({ alignContent: Alignment.End }) { | 104 | Stack({ alignContent: Alignment.End }) { |
| 101 | - Progress({ value: 0, total: 100, type: ProgressType.Linear }) | 105 | + Progress( |
| 106 | + { | ||
| 107 | + value: this.progressVal, | ||
| 108 | + total: 100, | ||
| 109 | + type: ProgressType.Linear, | ||
| 110 | + }) | ||
| 111 | + .style({ | ||
| 112 | + enableSmoothEffect: false | ||
| 113 | + }) | ||
| 102 | .color("#ED2800") | 114 | .color("#ED2800") |
| 103 | .backgroundColor($r('app.color.white')) | 115 | .backgroundColor($r('app.color.white')) |
| 104 | .width("100%") | 116 | .width("100%") |
| 105 | .height(3) | 117 | .height(3) |
| 106 | .margin({ top: 57 }) | 118 | .margin({ top: 57 }) |
| 107 | - .value(this.progressVal) | ||
| 108 | .visibility(this.isExpand ? Visibility.Visible : Visibility.Hidden) | 119 | .visibility(this.isExpand ? Visibility.Visible : Visibility.Hidden) |
| 109 | Stack({ alignContent: Alignment.End }) { | 120 | Stack({ alignContent: Alignment.End }) { |
| 110 | Column() { //标题 时间 进度条 | 121 | Column() { //标题 时间 进度条 |
-
Please register or login to post a comment