Showing
1 changed file
with
26 additions
and
9 deletions
| 1 | import { Action, ContentDTO, Params } from 'wdBean'; | 1 | import { Action, ContentDTO, Params } from 'wdBean'; |
| 2 | import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; | 2 | import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; |
| 3 | -import { Logger, ToastUtils } from 'wdKit'; | 3 | +import { Logger, ToastUtils, DateTimeUtils } from 'wdKit'; |
| 4 | import { CompUtils } from '../../utils/CompUtils'; | 4 | import { CompUtils } from '../../utils/CompUtils'; |
| 5 | import { ProcessUtils, WDRouterRule } from 'wdRouter'; | 5 | import { ProcessUtils, WDRouterRule } from 'wdRouter'; |
| 6 | 6 | ||
| @@ -433,15 +433,32 @@ export struct PaperSingleColumn999CardView { | @@ -433,15 +433,32 @@ export struct PaperSingleColumn999CardView { | ||
| 433 | .aspectRatio(16 / 9) | 433 | .aspectRatio(16 / 9) |
| 434 | .padding({ top: 10 }) | 434 | .padding({ top: 10 }) |
| 435 | if (this.item?.videoInfo) { | 435 | if (this.item?.videoInfo) { |
| 436 | - Stack() { | ||
| 437 | - Text(this.item?.videoInfo.videoDuration + "") | ||
| 438 | - .backgroundColor(Color.Black) | ||
| 439 | - .opacity(0.6) | 436 | + Row() { |
| 437 | + Image($r('app.media.card_play')) | ||
| 438 | + .width(14) | ||
| 439 | + .height(14) | ||
| 440 | + .objectFit(ImageFit.Contain) | ||
| 441 | + Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000)) | ||
| 442 | + .fontColor(Color.White) | ||
| 443 | + .fontSize($r('app.float.vp_12')) | ||
| 444 | + .fontWeight(500) | ||
| 445 | + .textAlign(TextAlign.End) | ||
| 446 | + .lineHeight(18) | ||
| 447 | + .textShadow({ | ||
| 448 | + radius: 2, | ||
| 449 | + color: 'rgba(0,0,0,0.3)', | ||
| 450 | + offsetY: 2 | ||
| 451 | + }) | ||
| 452 | + .margin({ | ||
| 453 | + right: 10, | ||
| 454 | + left: 3 | ||
| 455 | + }) | ||
| 456 | + } | ||
| 457 | + .margin({ | ||
| 458 | + bottom: 3 | ||
| 459 | + }) | ||
| 440 | .width(CommonConstants.FULL_PARENT) | 460 | .width(CommonConstants.FULL_PARENT) |
| 441 | - .padding({ left: 40 }) | ||
| 442 | - Image($r('app.media.iv_card_play_yellow_flag')) | ||
| 443 | - .fitOriginalSize(true) | ||
| 444 | - }.width(CommonConstants.FULL_PARENT) | 461 | + .justifyContent(FlexAlign.End) |
| 445 | } | 462 | } |
| 446 | }.margin({ left: 22, right: 22 }) | 463 | }.margin({ left: 22, right: 22 }) |
| 447 | } | 464 | } |
-
Please register or login to post a comment