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
lichengjun
2024-01-31 18:33:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9500f178e1f810a3488d689fb49aea93662196f1
9500f178
1 parent
44cd7601
大图卡(compstyle-2),三图卡(compstyle-4)UI
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
PeopleDaily_Harmony/wdComponent/src/main/ets/Index.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/CompParser.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/BigPicCardComponent.ets → PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/BigPicCardComponent.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/TriPicCardComponent.ets → PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/TriPicCardComponent.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/repository/bean/ContentDTO.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/Index.ets
View file @
9500f17
...
...
@@ -22,7 +22,7 @@ export { BannerComponent } from "./components/view/BannerComponent"
export { ColumnPageComponent } from "./components/page/ColumnPageComponent"
export { TriPicCardComponent } from "./components/TriPicCardComponent"
export { TriPicCardComponent } from "./components/
view/
TriPicCardComponent"
export { BigPicCardComponent } from "./components/BigPicCardComponent"
export { BigPicCardComponent } from "./components/
view/
BigPicCardComponent"
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/CompParser.ets
View file @
9500f17
...
...
@@ -7,6 +7,8 @@ import { TitleAllComponent } from './view/TitleAllComponent';
import { HorizontalStrokeCardThreeTwoRadioForOneComponent } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import { HorizontalStrokeCardThreeTwoRadioForTwoComponent } from './view/HorizontalStrokeCardThreeTwoRadioForTwoComponent';
import { HorizontalStrokeCardThreeTwoRadioForMoreComponent } from './view/HorizontalStrokeCardThreeTwoRadioForMoreComponent';
import { BigPicCardComponent } from './view/BigPicCardComponent';
import { TriPicCardComponent } from './view/TriPicCardComponent';
/**
* comp适配器.
...
...
@@ -30,6 +32,10 @@ export struct CompParser {
TitleAllComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) {
BannerComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === "2") {
BigPicCardComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === "4") {
TriPicCardComponent({ compDTO: compDTO })
} else {
// todo:组件未实现 / Component Not Implemented
Text(compDTO.compStyle)
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/BigPicCardComponent.ets → PeopleDaily_Harmony/wdComponent/src/main/ets/components/
view/
BigPicCardComponent.ets
View file @
9500f17
//全标题 "compStyle":"2",
import { CommonConstants } from 'wdConstant'
import { CompDTO } from '../repository/bean/CompDTO'
import { CompDTO } from '../
../
repository/bean/CompDTO'
const TAG: string = 'BigPicCardComponent';
/**
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/TriPicCardComponent.ets → PeopleDaily_Harmony/wdComponent/src/main/ets/components/
view/
TriPicCardComponent.ets
View file @
9500f17
//全标题 "compStyle":"4",
import { CommonConstants } from 'wdConstant'
import { CompDTO } from '../repository/bean/CompDTO'
import { CompDTO } from '../
../
repository/bean/CompDTO'
const TAG: string = 'TriPicCardComponent';
/**
...
...
@@ -29,17 +29,17 @@ export struct TriPicCardComponent {
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
//三图
Row() {
Image(this.compDTO.operDataList[0].fullColumnImgUrls[0].url)
Image(this.compDTO.operDataList[0].fullColumnImgUrls[0]
?
.url)
.width('32%')
.height(75)
.borderRadius({ topLeft:4,bottomLeft:4 })
Image(this.compDTO.operDataList[0].fullColumnImgUrls[1].url)
Image(this.compDTO.operDataList[0].fullColumnImgUrls[1]
?
.url)
.width('32%')
.height(75)
Image(this.compDTO.operDataList[0].fullColumnImgUrls[2].url)
Image(this.compDTO.operDataList[0].fullColumnImgUrls[2]
?
.url)
.width('32%')
.height(75)
.borderRadius({ topRight:4,bottomRight:4 })
...
...
@@ -67,11 +67,11 @@ export struct TriPicCardComponent {
.width(12)
.height(12)
Text(this.compDTO.operDataList[0].publishTime
+"分钟前"
)
Text(this.compDTO.operDataList[0].publishTime)
.bottomTextStyle()
Text(' ')
Text(
this.compDTO.operDataList[0].openLikes.toString()+"条评论"
)
Text(
'518条评论'
)
.bottomTextStyle()
}
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/repository/bean/ContentDTO.ets
View file @
9500f17
import { FullColumnImgUrlsDTO } from './FullColumnImgUrlsDTO';
export interface ContentDTO {
cityCode: string;
coverSize: string;
...
...
Please
register
or
login
to post a comment