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
chenjun3_wd
2024-04-11 18:19:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a667394ff68763499993e45c7c8d5b52985ae308
a667394f
1 parent
5f7ad01f
直播回看 直播预约样式
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
a667394
import { CompDTO} from 'wdBean';
import { CompDTO
} from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { BannerComponent } from './view/BannerComponent';
import { LabelComponent } from './view/LabelComponent';
...
...
@@ -9,11 +9,14 @@ import {
import {
HorizontalStrokeCardThreeTwoRadioForOneComponent
} from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import { ZhSingleRow04 } from './compview/ZhSingleRow04'
import { ZhSingleColumn04 } from './compview/ZhSingleColumn04'
import { ZhSingleColumn05 } from './compview/ZhSingleColumn05'
import { ZhGridLayout03 } from './compview/ZhGridLayout03'
import { ZhSingleRow04 } from './compview/ZhSingleRow04';
import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
import { ZhSingleColumn05 } from './compview/ZhSingleColumn05';
import { ZhGridLayout03 } from './compview/ZhGridLayout03';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
import { ZhGridLayout02 } from './compview/ZhGridLayout02';
/**
* comp适配器.
* 首页楼层comp解析器.
...
...
@@ -42,16 +45,20 @@ export struct CompParser {
} else {
HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: compDTO })
}
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
LiveHorizontalReservationComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) {
ZhGridLayout02({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: compDTO})
ZhSingleRow04({ compDTO: compDTO
})
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: compDTO})
ZhSingleColumn04({ compDTO: compDTO
})
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
ZhSingleColumn05({ compDTO: compDTO})
ZhSingleColumn05({ compDTO: compDTO
})
} else if (!Number.isNaN(Number(compDTO.compStyle))) {
CardParser({ contentDTO: compDTO.operDataList[0]});
CardParser({ contentDTO: compDTO.operDataList[0]
});
}
else {
// todo:组件未实现 / Component Not Implemented
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
a667394
...
...
@@ -100,7 +100,7 @@ export struct MorningEveningPaperComponent {
Logger.info(TAG, `currentTime = ${currentTime}`)
try {
// let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId)
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId)
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId)
//"25091"
this.pageInfoBean = pageInfoBean;
this.title = this.pageInfoBean?.topicInfo?.title
let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN);
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
a667394
// 视频直播横划卡16:9
import { LiveVideoTypeComponent } from './LiveVideoTypeComponent'
import { LiveHorizontalCardForOneComponent } from './LiveHorizontalCardForOneComponent'
import { CompDTO } from 'wdBean'
import { CompDTO
, ContentDTO
} from 'wdBean'
import { CommonConstants } from 'wdConstant'
import { ContentDTO } from 'wdBean'
@Component
export struct LiveHorizontalCardComponent {
@State compDTO: CompDTO = {} as CompDTO
build() {
Column() {
Row() {
...
...
@@ -37,6 +37,7 @@ export struct LiveHorizontalCardComponent {
.padding({ left: 16, right: 16 })
.margin({ top: 8, bottom: 8 })
.width(CommonConstants.FULL_WIDTH)
// 多个
if (this.compDTO.operDataList.length >= 2) {
List({ space: 12 }) {
...
...
@@ -69,7 +70,7 @@ export struct LiveHorizontalCardComponent {
.fontColor($r("app.color.color_212228"))
.fontWeight(400)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
// 超出的部分显示省略号。
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textAlign(TextAlign.Start)
.margin({ top: 8 })
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
...
...
@@ -97,4 +98,3 @@ export struct LiveHorizontalCardComponent {
.backgroundColor($r("app.color.white"))
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment