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
yumaochao
2024-05-29 18:00:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
211fd37c020bb75fa66da08835faa5de2e7b55cf
211fd37c
1 parent
778f7c85
fix:somebug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
211fd37
...
...
@@ -44,6 +44,7 @@ export struct CompParser {
aboutToAppear(): void {
console.log('CompParser-compDTO', JSON.stringify(this.compDTO))
// 轮播图屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
...
...
@@ -93,7 +94,7 @@ export struct CompParser {
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(
5).color('#f5f5f5').padding({ left: 0, right: 0
})
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16
})
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
...
...
@@ -103,7 +104,7 @@ export struct CompParser {
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(
5).color('#f5f5f5').padding({ left: 0, right: 0
})
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16
})
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
211fd37
...
...
@@ -18,6 +18,7 @@ const TAG: string = 'Card6Component-Card13Component';
@Component
export struct Card6Component {
@State pageId: string = '';
@State textHeight: number = 0 ; //获取文本的高度
@State pageName: string = '';
@State loadImg: boolean = false;
@State clicked: boolean = false;
...
...
@@ -63,7 +64,9 @@ export struct Card6Component {
}
}
Text() {
Text()
{
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
...
...
@@ -77,11 +80,12 @@ export struct Card6Component {
Span(this.contentDTO.newsTitle)
}
}
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(
3
)
.maxLines(
2
)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
...
...
@@ -89,7 +93,7 @@ export struct Card6Component {
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
0 )
}.alignContent(Alignment.TopStart)
// .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 60: 156)
}
.justifyContent(FlexAlign.Start)
...
...
@@ -98,8 +102,12 @@ export struct Card6Component {
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78: 156)
.justifyContent(FlexAlign.SpaceBetween)
.width('64%')
...
...
@@ -132,3 +140,4 @@ export struct Card6Component {
.alignItems(VerticalAlign.Top)
}
}
...
...
Please
register
or
login
to post a comment