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
陈剑华
2024-05-10 14:33:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6431409507bd75ca9fd2170e4c6b19ce3e3d78c9
64314095
1 parent
23538453
fix: 16705 阅读频道专题返回后鸿蒙版缺少置灰颜色变化
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
52 additions
and
24 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card12Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card15Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card16Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card21Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForOneComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
6431409
...
...
@@ -12,12 +12,13 @@ const TAG = 'Card11Component';
@Component
export struct Card11Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State clicked: boolean = false;
build() {
Column() {
Text(this.contentDTO.newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor($r("app.color.color_222222"))
.fontColor(
this.clicked ? 0x848484 :
$r("app.color.color_222222"))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -32,6 +33,8 @@ export struct Card11Component {
})
.backgroundColor($r("app.color.white"))
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card12Component.ets
View file @
6431409
...
...
@@ -13,6 +13,7 @@ const TAG = 'Card12Component';
@Component
export struct Card12Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State clicked: boolean = false;
aboutToAppear(): void {
}
...
...
@@ -27,7 +28,7 @@ export struct Card12Component {
if (this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.textOverflowStyle(3)
.margin({ bottom: 8 })
...
...
@@ -45,6 +46,7 @@ export struct Card12Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card14Component.ets
View file @
6431409
...
...
@@ -15,6 +15,7 @@ const TAG = 'Card14Component';
export struct Card14Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -31,7 +32,7 @@ export struct Card14Component {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.textOverflowStyle(3)
.lineHeight(25)
.fontFamily('PingFang SC-Regular')
...
...
@@ -63,6 +64,7 @@ export struct Card14Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card15Component.ets
View file @
6431409
...
...
@@ -19,6 +19,7 @@ const TAG: string = 'Card15Component';
export struct Card15Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -33,7 +34,7 @@ export struct Card15Component {
if (this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.textOverflowStyle(2)
.margin({ bottom: 8 })
...
...
@@ -61,6 +62,7 @@ export struct Card15Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card16Component.ets
View file @
6431409
...
...
@@ -20,6 +20,7 @@ interface fullColumnImgUrlItem {
export struct Card16Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -35,7 +36,7 @@ export struct Card16Component {
if (this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.textOverflowStyle(2)
.margin({ bottom: 8 })
...
...
@@ -62,6 +63,7 @@ export struct Card16Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
View file @
6431409
...
...
@@ -17,6 +17,7 @@ export struct Card17Component {
@State compDTO: CompDTO = {} as CompDTO
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -28,7 +29,7 @@ export struct Card17Component {
Text(this.contentDTO.newsTitle)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -79,6 +80,7 @@ export struct Card17Component {
}
.width(CommonConstants.FULL_WIDTH)
.onClick((event: ClickEvent) => {
this.clicked = true;
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
6431409
...
...
@@ -14,6 +14,7 @@ const TAG = 'Card19Component';
export struct Card19Component {
@State contentDTO: ContentDTO = {
} as ContentDTO
@State clicked: boolean = false;
build() {
Column() {
...
...
@@ -23,11 +24,12 @@ export struct Card19Component {
if (this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.textOverflowStyle(3)
.margin({ bottom: 8 })
.width(CommonConstants.FULL_WIDTH)
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
@@ -55,6 +57,7 @@ export struct Card19Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card20Component.ets
View file @
6431409
...
...
@@ -15,6 +15,7 @@ const TAG = 'Card20Component';
export struct Card20Component {
@State contentDTO: ContentDTO = {
} as ContentDTO;
@State clicked: boolean = false;
aboutToAppear(): void {
}
...
...
@@ -27,7 +28,7 @@ export struct Card20Component {
if (this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.textOverflowStyle(3)
.margin({ bottom: 8 })
...
...
@@ -46,6 +47,7 @@ export struct Card20Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card21Component.ets
View file @
6431409
...
...
@@ -15,6 +15,7 @@ const TAG: string = 'Card6Component-Card13Component';
export struct Card21Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -29,7 +30,7 @@ export struct Card21Component {
GridItem() {
Text(`${this.contentDTO.newsTitle}`)
.fontSize($r('app.float.selected_text_size'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.width(CommonConstants.FULL_WIDTH)
.maxLines(4)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
@@ -54,6 +55,7 @@ export struct Card21Component {
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
.padding({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
6431409
...
...
@@ -20,6 +20,7 @@ const TAG: string = 'Card2Component';
export struct Card2Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -35,7 +36,7 @@ export struct Card2Component {
}
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.align(Alignment.Start)
...
...
@@ -73,6 +74,7 @@ export struct Card2Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
6431409
...
...
@@ -10,22 +10,14 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
@Component
export struct Card3Component {
@State contentDTO: ContentDTO = {
// appStyle: '3',
// channelId: '2002',
// newsTitle: '习近平向斯洛伐克当选总统佩',
// objectId: '30044351686',
// objectType: '8',
// publishTime: '1712967589000',
// relId: '500005307414',
// relType: '1',
// source: '新华社',
} as ContentDTO;
@State clicked: boolean = false;
build() {
Column() {
Text(this.contentDTO.newsTitle)
.fontSize($r("app.float.font_size_16"))
.fontColor($r("app.color.color_222222"))
.fontColor(
this.clicked ? 0x848484 :
$r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
// 评论等信息
CardSourceInfo({ contentDTO: this.contentDTO })
...
...
@@ -38,6 +30,7 @@ export struct Card3Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
View file @
6431409
...
...
@@ -17,6 +17,8 @@ const TAG: string = 'Card4Component';
export struct Card4Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -29,7 +31,7 @@ export struct Card4Component {
//新闻标题
Text(this.contentDTO.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontColor($r('app.color.color_222222'))
.fontColor(
this.clicked ? 0x848484 :
$r('app.color.color_222222'))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
//三图
...
...
@@ -67,6 +69,7 @@ export struct Card4Component {
.justifyContent(FlexAlign.Start)
.alignItems(HorizontalAlign.Start)
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
//bottom 评论等信息
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
6431409
...
...
@@ -14,6 +14,7 @@ export struct Card5Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State titleShowPolicy: number | string = 1
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -62,6 +63,7 @@ export struct Card5Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
6431409
...
...
@@ -15,6 +15,7 @@ const TAG: string = 'Card6Component-Card13Component';
export struct Card6Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -40,13 +41,14 @@ export struct Card6Component {
}
Text(`${this.contentDTO.newsTitle}`)
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(16)
.fontWeight(FontWeight.Normal)
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags.length < 5 && this.contentDTO.newTags.length > 2 ? 60 :
this.contentDTO.newTags.length != 0 && this.contentDTO.newTags.length < 3 ? 30 : 0)
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 :
this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length < 3 ? 30 : 0)
}.alignContent(Alignment.TopStart)
}.height("80%")
...
...
@@ -71,6 +73,7 @@ export struct Card6Component {
.alignContent(Alignment.BottomEnd)
}
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
.padding({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
6431409
...
...
@@ -14,6 +14,7 @@ const TAG: string = 'Card9Component';
export struct Card9Component {
@State contentDTO: ContentDTO = {} as ContentDTO;
@State loadImg: boolean = false;
@State clicked: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -24,6 +25,7 @@ export struct Card9Component {
// 顶部标题,最多两行
if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) {
Text(this.contentDTO.newsTitle)
.fontColor(this.clicked ? 0x848484 : 0x222222)
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_17'))
.fontWeight(600)
...
...
@@ -81,6 +83,7 @@ export struct Card9Component {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForOneComponent.ets
View file @
6431409
...
...
@@ -7,6 +7,7 @@ import { LiveModel } from '../../viewmodel/LiveModel'
@Component
export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
@State compDTO: CompDTO = {} as CompDTO
@State clicked: boolean = false;
build() {
Column() {
...
...
@@ -18,7 +19,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
.margin({ right: 4 })
Text(this.compDTO.objectTitle)
.fontSize($r("app.float.font_size_17"))
.fontColor($r("app.color.color_222222"))
.fontColor(
this.clicked ? 0x848484 :
$r("app.color.color_222222"))
.fontWeight(600)
}
...
...
@@ -63,6 +64,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
.onClick(() => {
this.clicked = true;
this.gotoLive(this.compDTO?.operDataList[0])
})
}
...
...
Please
register
or
login
to post a comment