Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
4 changed files
with
58 additions
and
13 deletions
| @@ -106,7 +106,7 @@ export struct TopNavigationComponent { | @@ -106,7 +106,7 @@ export struct TopNavigationComponent { | ||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | //频道分类 | 108 | //频道分类 |
| 109 | - if (item.myChannel === '1') { | 109 | + if (item.myChannel === '1' && item.name !== '播报') { |
| 110 | _myChannelList.push(item) | 110 | _myChannelList.push(item) |
| 111 | _channelIds.push(item.channelId) | 111 | _channelIds.push(item.channelId) |
| 112 | } else if (item.moreChannel === '1') { | 112 | } else if (item.moreChannel === '1') { |
| @@ -299,12 +299,13 @@ export struct TopNavigationComponent { | @@ -299,12 +299,13 @@ export struct TopNavigationComponent { | ||
| 299 | .fontColor(this.getFontColor(item, index)) | 299 | .fontColor(this.getFontColor(item, index)) |
| 300 | .padding({ top: $r('app.float.top_tab_item_padding_top') }) | 300 | .padding({ top: $r('app.float.top_tab_item_padding_top') }) |
| 301 | .maxLines(this.MAX_LINE) | 301 | .maxLines(this.MAX_LINE) |
| 302 | - Divider() | ||
| 303 | - .width(16) | ||
| 304 | - .strokeWidth(2)// 分割线粗细度。 | ||
| 305 | - .padding({ top: 2 }) | ||
| 306 | - .color(Color.Red) | ||
| 307 | - .opacity(this.currentTopNavSelectedIndex === index ? 1 : 0) | 302 | + if (this.currentTopNavSelectedIndex === index) { |
| 303 | + Row() | ||
| 304 | + .width(20) | ||
| 305 | + .height(3) | ||
| 306 | + .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat) | ||
| 307 | + } | ||
| 308 | + | ||
| 308 | } | 309 | } |
| 309 | .hoverEffect(HoverEffect.Highlight) | 310 | .hoverEffect(HoverEffect.Highlight) |
| 310 | .constraintSize({ | 311 | .constraintSize({ |
| @@ -13,6 +13,7 @@ import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | @@ -13,6 +13,7 @@ import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | ||
| 13 | import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem'; | 13 | import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem'; |
| 14 | import common from '@ohos.app.ability.common'; | 14 | import common from '@ohos.app.ability.common'; |
| 15 | import dataPreferences from '@ohos.data.preferences'; | 15 | import dataPreferences from '@ohos.data.preferences'; |
| 16 | +import { TitleBackComponent } from './TitleBackComponent'; | ||
| 16 | 17 | ||
| 17 | @Component | 18 | @Component |
| 18 | export struct MineSettingComponent { | 19 | export struct MineSettingComponent { |
| @@ -67,11 +68,15 @@ export struct MineSettingComponent { | @@ -67,11 +68,15 @@ export struct MineSettingComponent { | ||
| 67 | } | 68 | } |
| 68 | 69 | ||
| 69 | build() { | 70 | build() { |
| 70 | - Navigation() { | ||
| 71 | - //滑动区域 | 71 | + // Navigation() { |
| 72 | + // //滑动区域 | ||
| 73 | + // this.settingList() | ||
| 74 | + // }.titleMode(NavigationTitleMode.Mini) | ||
| 75 | + // .title('设置') | ||
| 76 | + Column(){ | ||
| 77 | + TitleBackComponent({title:"设置"}) | ||
| 72 | this.settingList() | 78 | this.settingList() |
| 73 | - }.titleMode(NavigationTitleMode.Mini) | ||
| 74 | - .title('设置') | 79 | + } |
| 75 | } | 80 | } |
| 76 | 81 | ||
| 77 | // // 页面布局 | 82 | // // 页面布局 |
| @@ -159,7 +164,7 @@ export struct MineSettingComponent { | @@ -159,7 +164,7 @@ export struct MineSettingComponent { | ||
| 159 | }) | 164 | }) |
| 160 | }.onScrollFrameBegin((offset, state) => { | 165 | }.onScrollFrameBegin((offset, state) => { |
| 161 | return { offsetRemain: 0 } | 166 | return { offsetRemain: 0 } |
| 162 | - }) | 167 | + }).divider({strokeWidth:1,color:"#f0f0f0",startMargin: 15,endMargin: 10}) |
| 163 | } | 168 | } |
| 164 | .backgroundColor(Color.White) | 169 | .backgroundColor(Color.White) |
| 165 | .borderRadius(8) | 170 | .borderRadius(8) |
| @@ -203,7 +208,7 @@ export struct MineSettingComponent { | @@ -203,7 +208,7 @@ export struct MineSettingComponent { | ||
| 203 | Toggle({ type: ToggleType.Switch, isOn: item.switchState }) | 208 | Toggle({ type: ToggleType.Switch, isOn: item.switchState }) |
| 204 | .height('50lpx') | 209 | .height('50lpx') |
| 205 | .margin({ left: '81lpx', right: '29lpx' }) | 210 | .margin({ left: '81lpx', right: '29lpx' }) |
| 206 | - .selectedColor(Color.Pink) | 211 | + .selectedColor("#ED2800") |
| 207 | .onChange((isOn: boolean) => { | 212 | .onChange((isOn: boolean) => { |
| 208 | if(item.itemType=='push_switch'){ | 213 | if(item.itemType=='push_switch'){ |
| 209 | //推送 | 214 | //推送 |
sight_harmony/features/wdComponent/src/main/ets/components/setting/TitleBackComponent.ets
0 → 100644
| 1 | +import { router } from '@kit.ArkUI' | ||
| 2 | + | ||
| 3 | +@Component | ||
| 4 | +export struct TitleBackComponent { | ||
| 5 | + @State title: string = '' | ||
| 6 | + | ||
| 7 | + build() { | ||
| 8 | + RelativeContainer() { | ||
| 9 | + Text(this.title) | ||
| 10 | + .fontColor('#FF333333') | ||
| 11 | + .fontSize(18) | ||
| 12 | + .textAlign(TextAlign.Center) | ||
| 13 | + .height(44) | ||
| 14 | + .alignRules({ | ||
| 15 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 16 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 17 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 18 | + | ||
| 19 | + }) | ||
| 20 | + .id('titleContent') | ||
| 21 | + Image($r('app.media.back_icon')) | ||
| 22 | + .objectFit(ImageFit.Auto) | ||
| 23 | + .height(24) | ||
| 24 | + .width(24) | ||
| 25 | + .margin({ | ||
| 26 | + left: 16, top: 8 | ||
| 27 | + }) | ||
| 28 | + .alignRules({ | ||
| 29 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 30 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 31 | + }) | ||
| 32 | + .onClick(() => { | ||
| 33 | + router.back() | ||
| 34 | + }) | ||
| 35 | + .id('backImage') | ||
| 36 | + | ||
| 37 | + }.height(44) | ||
| 38 | + } | ||
| 39 | +} |
-
Please register or login to post a comment