zhenghy
... ... @@ -106,7 +106,7 @@ export struct TopNavigationComponent {
}
//频道分类
if (item.myChannel === '1') {
if (item.myChannel === '1' && item.name !== '播报') {
_myChannelList.push(item)
_channelIds.push(item.channelId)
} else if (item.moreChannel === '1') {
... ... @@ -299,12 +299,13 @@ export struct TopNavigationComponent {
.fontColor(this.getFontColor(item, index))
.padding({ top: $r('app.float.top_tab_item_padding_top') })
.maxLines(this.MAX_LINE)
Divider()
.width(16)
.strokeWidth(2)// 分割线粗细度。
.padding({ top: 2 })
.color(Color.Red)
.opacity(this.currentTopNavSelectedIndex === index ? 1 : 0)
if (this.currentTopNavSelectedIndex === index) {
Row()
.width(20)
.height(3)
.backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat)
}
}
.hoverEffect(HoverEffect.Highlight)
.constraintSize({
... ...
... ... @@ -13,6 +13,7 @@ import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem';
import common from '@ohos.app.ability.common';
import dataPreferences from '@ohos.data.preferences';
import { TitleBackComponent } from './TitleBackComponent';
@Component
export struct MineSettingComponent {
... ... @@ -67,11 +68,15 @@ export struct MineSettingComponent {
}
build() {
Navigation() {
//滑动区域
// Navigation() {
// //滑动区域
// this.settingList()
// }.titleMode(NavigationTitleMode.Mini)
// .title('设置')
Column(){
TitleBackComponent({title:"设置"})
this.settingList()
}.titleMode(NavigationTitleMode.Mini)
.title('设置')
}
}
// // 页面布局
... ... @@ -159,7 +164,7 @@ export struct MineSettingComponent {
})
}.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}).divider({strokeWidth:1,color:"#f0f0f0",startMargin: 15,endMargin: 10})
}
.backgroundColor(Color.White)
.borderRadius(8)
... ... @@ -203,7 +208,7 @@ export struct MineSettingComponent {
Toggle({ type: ToggleType.Switch, isOn: item.switchState })
.height('50lpx')
.margin({ left: '81lpx', right: '29lpx' })
.selectedColor(Color.Pink)
.selectedColor("#ED2800")
.onChange((isOn: boolean) => {
if(item.itemType=='push_switch'){
//推送
... ...
import { router } from '@kit.ArkUI'
@Component
export struct TitleBackComponent {
@State title: string = ''
build() {
RelativeContainer() {
Text(this.title)
.fontColor('#FF333333')
.fontSize(18)
.textAlign(TextAlign.Center)
.height(44)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.id('titleContent')
Image($r('app.media.back_icon'))
.objectFit(ImageFit.Auto)
.height(24)
.width(24)
.margin({
left: 16, top: 8
})
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
})
.onClick(() => {
router.back()
})
.id('backImage')
}.height(44)
}
}
\ No newline at end of file
... ...