Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhangbo1_wd
2024-05-31 18:39:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bd98e165523e81ecfe2dfdb6573fe910febc5b1c
bd98e165
1 parent
a9e47f05
组件复用,待调
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
bd98e16
...
...
@@ -11,6 +11,7 @@ import font from '@ohos.font';
* 视频:点播图标+时长;直播图标+'直播中'
*/
@Component
@Reusable
export struct CardMediaInfo {
@State livePeopleNum :boolean = true
...
...
@@ -33,6 +34,16 @@ export struct CardMediaInfo {
})
}
aboutToReuse(params: Record<string, object>): void {
this.contentDTO = params.contentDTO as ContentDTO
}
aboutToRecycle(): void {
}
aboutToDisappear(): void {
}
/**
* 全域数字显示规则
* 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
bd98e16
import { CompDTO, ContentDTO } from 'wdBean'
import { CommonConstants } from 'wdConstant/Index';
import { DateTimeUtils } from 'wdKit/Index';
import { JSON } from '@kit.ArkTS';
import router from '@ohos.router'
@Reusable
@Component
export struct CardSourceInfo {
@State contentDTO: ContentDTO = new ContentDTO();
@ObjectLink compDTO: CompDTO
aboutToAppear(): void {
}
aboutToReuse(params: Record<string, object>): void {
this.contentDTO = params.contentDTO as ContentDTO
}
aboutToRecycle(): void {
}
aboutToDisappear(): void {
}
handleTimeStr() {
return DateTimeUtils.getCommentTime(
this.contentDTO.publishTime.includes(' ')
...
...
Please
register
or
login
to post a comment