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
yanlu
2024-05-06 11:38:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5e455630461ba2716eb61d4681a416734daba83c
5e455630
1 parent
8d3ea17b
fix:16809 人民号下我的关注图标样式鸿蒙与安卓不一致
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
17 deletions
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipAttentionContentListHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipAttentionContentListTopComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipAttentionContentListHeadComponent.ets
View file @
5e45563
...
...
@@ -3,31 +3,29 @@ import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem';
@Component
export struct PeopleShipAttentionContentListHeadComponent {
@State index: number = 0
@ObjectLink item: FollowListDetailItem
build() {
Column(){
Column()
{
// 头像
PeopleShipHomePageHeadComponent({
diameter: 48,
iconDiameter: 16,
headPhotoUrl: this.index == 0 ? $r('app.media.attention_mine') :
((this.item.attentionHeadPhotoUrl && this.item.attentionHeadPhotoUrl.length > 0) ?
this.item.attentionHeadPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon')),
authIcon: this.index == 0 ? '' : this.item.authIcon
headPhotoUrl: (this.item.attentionHeadPhotoUrl && this.item.attentionHeadPhotoUrl.length > 0) ?
this.item.attentionHeadPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'),
authIcon: this.item.authIcon
}).margin({
bottom: '8vp'
})
Text(this.i
ndex == 0 ? '我的关注' : this.i
tem.attentionUserName)
Text(this.item.attentionUserName)
.fontColor($r('app.color.color_666666'))
.fontSize($r('app.float.vp_13'))
.fontWeight(400)
.height('18vp')
.lineHeight('18vp')
.maxLines(1)
.textOverflow({
overflow: TextOverflow.Ellipsis
})
.textOverflow({
overflow: TextOverflow.Ellipsis
})
.padding({
left: '2vp',
right: '2vp'
...
...
@@ -36,7 +34,7 @@ export struct PeopleShipAttentionContentListHeadComponent {
.alignItems(HorizontalAlign.Center)
.width('78vp')
.margin({
left:
this.index == 0 ? '8vp' :
'4vp',
left: '4vp',
top: '14vp',
bottom: '14vp'
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipAttentionContentListTopComponent.ets
View file @
5e45563
...
...
@@ -10,27 +10,23 @@ export struct PeopleShipAttentionContentListTopComponent {
Column() {
List(){
ListItem() {
PeopleShipAttentionContentListHeadComponent({
index: 0,
item: this.followList[0]
})
this.PeopleShipFollowTop()
}.onClick(() => {
// 跳转到关注列表-我的
WDRouterRule.jumpWithPage(WDRouterPage.followListPage)
})
ForEach(this.followList, (item: FollowListDetailItem
, index: number
) => {
ForEach(this.followList, (item: FollowListDetailItem) => {
ListItem() {
PeopleShipAttentionContentListHeadComponent({
index: index + 1,
item: item
})
}.onClick(() => {
let creatorId = item.attentionCreatorId || ''
ProcessUtils.gotoPeopleShipHomePage(creatorId)
})
}, (item: FollowListDetailItem
) => item.attentionCreatorId
)
}, (item: FollowListDetailItem
, index: number) => item.attentionCreatorId + index
)
}
.listDirection(Axis.Horizontal)
.scrollBar(BarState.Off)
...
...
@@ -39,4 +35,41 @@ export struct PeopleShipAttentionContentListTopComponent {
Divider().strokeWidth(1).color($r('app.color.color_F5F5F5'))
}
}
@Builder
PeopleShipFollowTop() {
Column(){
// 头像
Image( $r('app.media.attention_mine') )
.alt($r('app.media.attention_mine'))
.width(48)
.height(48)
.borderRadius(24)
.objectFit(ImageFit.ScaleDown)
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({
bottom: '8vp'
})
Text('我的关注')
.fontColor($r('app.color.color_666666'))
.fontSize($r('app.float.vp_13'))
.fontWeight(400)
.height('18vp')
.lineHeight('18vp')
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
.padding({
left: '2vp',
right: '2vp'
})
}
.alignItems(HorizontalAlign.Center)
.width('78vp')
.margin({
left: '8vp',
top: '14vp',
bottom: '14vp'
})
}
}
...
...
Please
register
or
login
to post a comment