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-15 15:17:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fb739b704e56d23244ce9d853adcc7e4851bc497
fb739b70
1 parent
55f9cc97
fix:16680 功能缺陷--大家聊,鸿蒙版字体间距与安卓不一致
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
33 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
View file @
fb739b7
...
...
@@ -96,10 +96,10 @@ export struct RmhTitle {
build() {
Flex() {
Stack() {
Image(this.rmhInfo.rmhHeadUrl)
Image(this.rmhInfo
?
.rmhHeadUrl)
.width(36)
.height(36).borderRadius(50)
Image(this.rmhInfo.authIcon)
Image(this.rmhInfo
?
.authIcon)
.width(14)
.height(14)
.borderRadius(50)
...
...
@@ -109,7 +109,7 @@ export struct RmhTitle {
.flexShrink(0)
Column() {
Text(this.rmhInfo.rmhName)
Text(this.rmhInfo
?
.rmhName)
.fontSize($r('app.float.font_size_13'))
.fontColor($r('app.color.color_222222'))
.fontWeight(600)
...
...
@@ -122,13 +122,13 @@ export struct RmhTitle {
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
}
if (this.publishTime && this.rmhInfo.rmhDesc) {
if (this.publishTime && this.rmhInfo
?
.rmhDesc) {
Image($r('app.media.point'))
.width(16)
.height(16)
}
}
Text(this.rmhInfo.rmhDesc)
Text(this.rmhInfo
?
.rmhDesc)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
...
...
@@ -141,7 +141,7 @@ export struct RmhTitle {
}
Blank()
if (this.rmhInfo.cnIsAttention) {
if (this.rmhInfo
?
.cnIsAttention) {
Row() {
if (Number(this.followStatus) === 0) {
Image($r('app.media.rmh_follow'))
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
View file @
fb739b7
...
...
@@ -49,7 +49,7 @@ export class LiveModel {
success(data.data)
}, (error: Error) => {
fail(error.message)
Logger.debug(TAG + ":error ", error.
toString()
)
Logger.debug(TAG + ":error ", error.
message
)
})
})
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabComponent.ets
View file @
fb739b7
...
...
@@ -26,32 +26,57 @@ export struct TabComponent {
}
build() {
Tabs({ barPosition: BarPosition.Start, index: this.currentIndex, controller: this.controller }) {
ForEach(this.tabs, (item: string, index: number) => {
TabContent() {
if ('简介' === item) {
TabInfoComponent()
} else if ('直播间' === item) {
TabLiveComponent()
} else if ('大家聊' === item) {
TabChatComponent()
Stack({alignContent: Alignment.TopStart}) {
Tabs({ barPosition: BarPosition.Start, index: this.currentIndex, controller: this.controller }) {
ForEach(this.tabs, (item: string, index: number) => {
TabContent() {
if ('简介' === item) {
TabInfoComponent()
} else if ('直播间' === item) {
TabLiveComponent()
} else if ('大家聊' === item) {
TabChatComponent()
}
}
}.tabBar(this.tabBuilder(index, item))
.backgroundColor('#F5F5F5')
}, (item: string, index: number) => {
return item + index
.backgroundColor('#F5F5F5')
}, (item: string, index: number) => {
return item + index
})
}
.layoutWeight(1)
.vertical(false)
.barMode(BarMode.Fixed)
.barHeight(48)
.animationDuration(100)
.onChange((index: number) => {
this.currentIndex = index
})
}
.layoutWeight(1)
.vertical(false)
.barMode(BarMode.Fixed)
.barWidth(70 * this.tabs.length)
.barHeight(48)
.animationDuration(100)
.onChange((index: number) => {
this.currentIndex = index
})
.backgroundColor(Color.White)
.backgroundColor(Color.White)
// 页签
Row() {
Scroll() {
Row({space: '24vp'}) {
ForEach(this.tabs, (item: string, index: number) => {
this.tabBuilder(index, item)
})
}
.width('100%')
.justifyContent(FlexAlign.Center)
}
.backgroundColor(Color.White)
.align(Alignment.Start)
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
}
.backgroundColor(Color.White)
.height('48vp')
.alignItems(VerticalAlign.Bottom)
.width('100%')
}.layoutWeight(1)
}
@Builder
...
...
@@ -60,7 +85,7 @@ export struct TabComponent {
Text(name)
.margin({ top: 6 })
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize('18
f
p')
.fontSize('18
v
p')
.fontWeight(this.currentIndex === index ? 600 : 400)
Divider()
.strokeWidth(2)
...
...
@@ -68,7 +93,13 @@ export struct TabComponent {
.width(15)
.color('#CB0000')
.visibility(this.currentIndex === index ? Visibility.Visible : Visibility.Hidden)
}.width('100%')
}.justifyContent(FlexAlign.Center)
.constraintSize({ minWidth: 35 })
.height('48vp')
.onClick(() => {
this.controller.changeIndex(index)
this.currentIndex = index
})
}
aboutToDisappear(): void {
...
...
Please
register
or
login
to post a comment