Showing
9 changed files
with
189 additions
and
15 deletions
| @@ -60,3 +60,5 @@ export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/Broa | @@ -60,3 +60,5 @@ export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/Broa | ||
| 60 | 60 | ||
| 61 | export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/FirstTabTopSearchComponent" | 61 | export { FirstTabTopSearchComponent } from "./src/main/ets/components/search/FirstTabTopSearchComponent" |
| 62 | 62 | ||
| 63 | +export { ListHasNoMoreDataUI } from "./src/main/ets/components/reusable/ListHasNoMoreDataUI" | ||
| 64 | + |
| @@ -155,7 +155,8 @@ export struct TopNavigationComponent { | @@ -155,7 +155,8 @@ export struct TopNavigationComponent { | ||
| 155 | .width(72) | 155 | .width(72) |
| 156 | .height(29) | 156 | .height(29) |
| 157 | .onClick((event: ClickEvent) => { | 157 | .onClick((event: ClickEvent) => { |
| 158 | - this.jumpToENewPaper() | 158 | + this.jumpToLiveDetailsPaper() |
| 159 | + // this.jumpToENewPaper() | ||
| 159 | }) | 160 | }) |
| 160 | 161 | ||
| 161 | Stack({ alignContent: Alignment.Center }) { | 162 | Stack({ alignContent: Alignment.Center }) { |
| @@ -6,5 +6,7 @@ | @@ -6,5 +6,7 @@ | ||
| 6 | "description": "Please describe the basic information.", | 6 | "description": "Please describe the basic information.", |
| 7 | "main": "Index.ets", | 7 | "main": "Index.ets", |
| 8 | "version": "1.0.0", | 8 | "version": "1.0.0", |
| 9 | - "dependencies": {} | 9 | + "dependencies": { |
| 10 | + "wdComponent": "file:../../features/wdComponent" | ||
| 11 | + } | ||
| 10 | } | 12 | } |
| @@ -6,8 +6,8 @@ export struct BottomComponent { | @@ -6,8 +6,8 @@ export struct BottomComponent { | ||
| 6 | build() { | 6 | build() { |
| 7 | Row() { | 7 | Row() { |
| 8 | 8 | ||
| 9 | - }.backgroundColor(Color.Red) | ||
| 10 | - .height('50vp') | 9 | + }.backgroundColor(Color.Gray) |
| 10 | + .height(56) | ||
| 11 | .width('100%') | 11 | .width('100%') |
| 12 | } | 12 | } |
| 13 | 13 |
| 1 | +import { ListHasNoMoreDataUI } from 'wdComponent/Index' | ||
| 2 | +import { TabChatItemComponent } from './TabChatItemComponent' | ||
| 3 | + | ||
| 1 | @Component | 4 | @Component |
| 2 | export struct TabChatComponent { | 5 | export struct TabChatComponent { |
| 3 | arr: string[] = [] | 6 | arr: string[] = [] |
| 7 | + | ||
| 4 | aboutToAppear(): void { | 8 | aboutToAppear(): void { |
| 5 | - for (let index = 0; index < 80; index++) { | 9 | + for (let index = 0; index < 12; index++) { |
| 6 | this.arr.push(index + '') | 10 | this.arr.push(index + '') |
| 7 | } | 11 | } |
| 8 | } | 12 | } |
| 9 | 13 | ||
| 10 | build() { | 14 | build() { |
| 11 | - List() { | ||
| 12 | - ForEach(this.arr, (item: string) => { | ||
| 13 | - ListItem() { | ||
| 14 | - Column() { | ||
| 15 | - Text(item) | ||
| 16 | - Divider().height(10).width('100%') | 15 | + Stack() { |
| 16 | + if (this.arr.length == 0) { | ||
| 17 | + ListHasNoMoreDataUI({ style: 2 }) | ||
| 18 | + } else { | ||
| 19 | + List() { | ||
| 20 | + ForEach(this.arr, (item: string) => { | ||
| 21 | + ListItem() { | ||
| 22 | + TabChatItemComponent() | ||
| 23 | + } | ||
| 24 | + }) | ||
| 25 | + ListItem() { | ||
| 26 | + ListHasNoMoreDataUI() | ||
| 17 | } | 27 | } |
| 18 | - .backgroundColor(Color.Gray) | ||
| 19 | } | 28 | } |
| 20 | - }) | 29 | + } |
| 21 | } | 30 | } |
| 31 | + .align(Alignment.Top) | ||
| 32 | + .backgroundColor('#F5F5F5') | ||
| 33 | + .height('100%') | ||
| 34 | + .width('100%') | ||
| 22 | } | 35 | } |
| 23 | 36 | ||
| 24 | aboutToDisappear(): void { | 37 | aboutToDisappear(): void { |
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatItemComponent.ets
0 → 100644
| 1 | +@Component | ||
| 2 | +export struct TabChatItemComponent { | ||
| 3 | + aboutToAppear(): void { | ||
| 4 | + } | ||
| 5 | + | ||
| 6 | + build() { | ||
| 7 | + Row() { | ||
| 8 | + Image('https://img0.baidu.com/it/u=4105778329,1297102594&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500') | ||
| 9 | + .borderRadius(90) | ||
| 10 | + .width(24) | ||
| 11 | + .height(24) | ||
| 12 | + Text() { | ||
| 13 | + Span('10999@qq.com: ') | ||
| 14 | + .fontColor('#666666') | ||
| 15 | + Span('少年强则国强:山中有精灵也不过如此了') | ||
| 16 | + .fontColor('#222222') | ||
| 17 | + } | ||
| 18 | + .margin({ left: 8 }) | ||
| 19 | + .lineHeight(20) | ||
| 20 | + .layoutWeight(1) | ||
| 21 | + .fontSize('14fp') | ||
| 22 | + .fontWeight(400) | ||
| 23 | + } | ||
| 24 | + .alignItems(VerticalAlign.Top) | ||
| 25 | + .padding({ | ||
| 26 | + left: 15, | ||
| 27 | + top: 15, | ||
| 28 | + right: 15 | ||
| 29 | + }) | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + aboutToDisappear(): void { | ||
| 33 | + | ||
| 34 | + } | ||
| 35 | +} |
| 1 | import { LiveCountdownComponent } from './LiveCountdownComponent' | 1 | import { LiveCountdownComponent } from './LiveCountdownComponent' |
| 2 | 2 | ||
| 3 | -@Entry | ||
| 4 | @Component | 3 | @Component |
| 5 | export struct TabInfoComponent { | 4 | export struct TabInfoComponent { |
| 6 | aboutToAppear(): void { | 5 | aboutToAppear(): void { |
| @@ -11,7 +10,7 @@ export struct TabInfoComponent { | @@ -11,7 +10,7 @@ export struct TabInfoComponent { | ||
| 11 | this.showLiveTitle() | 10 | this.showLiveTitle() |
| 12 | this.showLiveDetails() | 11 | this.showLiveDetails() |
| 13 | LiveCountdownComponent() | 12 | LiveCountdownComponent() |
| 14 | - }.padding({ | 13 | + }.margin({ |
| 15 | top: 13, | 14 | top: 13, |
| 16 | left: 16, | 15 | left: 16, |
| 17 | right: 16 | 16 | right: 16 |
| 1 | +import { ListHasNoMoreDataUI } from 'wdComponent/Index' | ||
| 2 | +import { TabLiveItemComponent } from './TabLiveItemComponent' | ||
| 3 | + | ||
| 1 | @Component | 4 | @Component |
| 2 | export struct TabLiveComponent { | 5 | export struct TabLiveComponent { |
| 6 | + arr: string[] = [] | ||
| 7 | + | ||
| 3 | aboutToAppear(): void { | 8 | aboutToAppear(): void { |
| 9 | + for (let index = 0; index < 2; index++) { | ||
| 10 | + this.arr.push(index + '') | ||
| 11 | + } | ||
| 4 | } | 12 | } |
| 5 | 13 | ||
| 6 | build() { | 14 | build() { |
| 15 | + Stack() { | ||
| 16 | + if (this.arr.length == 0) { | ||
| 17 | + ListHasNoMoreDataUI({ style: 2 }) | ||
| 18 | + } else { | ||
| 19 | + List() { | ||
| 20 | + ForEach(this.arr, (item: string) => { | ||
| 21 | + ListItem() { | ||
| 22 | + TabLiveItemComponent({ item: item }) | ||
| 23 | + } | ||
| 24 | + }) | ||
| 25 | + ListItem() { | ||
| 26 | + ListHasNoMoreDataUI() | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | + .alignContent(Alignment.Top) | ||
| 32 | + .backgroundColor('#F5F5F5') | ||
| 33 | + .height('100%') | ||
| 34 | + .width('100%') | ||
| 35 | + | ||
| 7 | } | 36 | } |
| 8 | 37 | ||
| 9 | aboutToDisappear(): void { | 38 | aboutToDisappear(): void { |
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveItemComponent.ets
0 → 100644
| 1 | +@Component | ||
| 2 | +export struct TabLiveItemComponent { | ||
| 3 | + item: string = '' | ||
| 4 | + | ||
| 5 | + aboutToAppear(): void { | ||
| 6 | + | ||
| 7 | + } | ||
| 8 | + | ||
| 9 | + build() { | ||
| 10 | + Column() { | ||
| 11 | + Row() { | ||
| 12 | + Image('https://img0.baidu.com/it/u=4105778329,1297102594&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500') | ||
| 13 | + .borderRadius(90) | ||
| 14 | + .width(24) | ||
| 15 | + .height(24) | ||
| 16 | + Text('人民日报直播频道') | ||
| 17 | + .maxLines(1) | ||
| 18 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 19 | + .fontSize('14fp') | ||
| 20 | + .fontWeight(400) | ||
| 21 | + .fontColor('#222222') | ||
| 22 | + .margin({ left: 8 }) | ||
| 23 | + Text('嘉宾') | ||
| 24 | + .maxLines(1) | ||
| 25 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 26 | + .fontSize('11fp') | ||
| 27 | + .fontWeight(400) | ||
| 28 | + .fontColor('#968562') | ||
| 29 | + .backgroundColor('#F1EFEB') | ||
| 30 | + .padding({ | ||
| 31 | + left: 4, | ||
| 32 | + top: 1, | ||
| 33 | + right: 4, | ||
| 34 | + bottom: 1 | ||
| 35 | + }) | ||
| 36 | + .borderRadius(2) | ||
| 37 | + .margin({ left: 8 }) | ||
| 38 | + Text('1小时前') | ||
| 39 | + .maxLines(1) | ||
| 40 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 41 | + .fontSize('12fp') | ||
| 42 | + .fontWeight(400) | ||
| 43 | + .fontColor('#999999') | ||
| 44 | + .margin({ left: 8 }) | ||
| 45 | + Blank() | ||
| 46 | + Text('置顶') | ||
| 47 | + .maxLines(1) | ||
| 48 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 49 | + .fontSize('11fp') | ||
| 50 | + .fontWeight(400) | ||
| 51 | + .fontColor('#ED2800') | ||
| 52 | + .backgroundColor('#F1EFEB') | ||
| 53 | + .padding({ | ||
| 54 | + left: 4, | ||
| 55 | + top: 1, | ||
| 56 | + right: 4, | ||
| 57 | + bottom: 1 | ||
| 58 | + }) | ||
| 59 | + .borderRadius(2) | ||
| 60 | + .margin({ left: 8 }) | ||
| 61 | + } | ||
| 62 | + .width('100%') | ||
| 63 | + | ||
| 64 | + Text('国务院新闻办公室将于7月25日上午10时举行国务院政策例行吹风会,请应急管理部副部长、水利部副部长王道席和自然资源部、水利部、应急管理部、中国气象局、国家消防救援局有关负责人介绍防汛抗旱工作情况,并答记者问。') | ||
| 65 | + .fontSize('14fp') | ||
| 66 | + .fontWeight(400) | ||
| 67 | + .fontColor('#222222') | ||
| 68 | + .margin({ | ||
| 69 | + left: 32, | ||
| 70 | + top: 6 | ||
| 71 | + }) | ||
| 72 | + | ||
| 73 | + Image('https://t7.baidu.com/it/u=3690528415,706188365&fm=193&f=GIF') | ||
| 74 | + .height(174) | ||
| 75 | + .width(310) | ||
| 76 | + .aspectRatio(310 / 174) | ||
| 77 | + .objectFit(ImageFit.Auto) | ||
| 78 | + .borderRadius(4) | ||
| 79 | + .margin({ | ||
| 80 | + left: 32, | ||
| 81 | + top: 8 | ||
| 82 | + }) | ||
| 83 | + }.margin({ | ||
| 84 | + left:15, | ||
| 85 | + top:15, | ||
| 86 | + right:15 | ||
| 87 | + }) | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + aboutToDisappear(): void { | ||
| 91 | + | ||
| 92 | + } | ||
| 93 | +} |
-
Please register or login to post a comment