Showing
6 changed files
with
71 additions
and
5 deletions
| 1 | +import { ColumnPageComponent } from 'wdComponent'; | ||
| 2 | + | ||
| 3 | +import { Logger } from 'wdKit'; | ||
| 4 | + | ||
| 5 | +const TAG = 'ColumnPage'; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 二级栏目页面,显示展排数据(comp list) | ||
| 9 | + */ | ||
| 10 | +@Entry | ||
| 11 | +@Component | ||
| 12 | +struct ColumnPage { | ||
| 13 | + aboutToAppear() { | ||
| 14 | + Logger.info(TAG, `aboutToAppear `); | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + aboutToDisappear() { | ||
| 18 | + Logger.info(TAG, 'aboutToDisappear'); | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + onPageShow() { | ||
| 22 | + Logger.info(TAG, 'onPageShow'); | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + onPageHide() { | ||
| 26 | + Logger.info(TAG, 'onPageHide'); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + onBackPress() { | ||
| 30 | + Logger.info(TAG, 'onBackPress'); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + build() { | ||
| 34 | + Column() { | ||
| 35 | + // TODO 跳转获取id | ||
| 36 | + ColumnPageComponent({ pageId: "20011", channelId: "2001"}); | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | +} |
| @@ -10,9 +10,9 @@ export { LoadingComponent } from "./components/view/LoadingComponent" | @@ -10,9 +10,9 @@ export { LoadingComponent } from "./components/view/LoadingComponent" | ||
| 10 | 10 | ||
| 11 | export { PageComponent } from "./components/page/PageComponent" | 11 | export { PageComponent } from "./components/page/PageComponent" |
| 12 | 12 | ||
| 13 | -export { BottomNavigationComponent } from "./components/view/BottomNavigationComponent" | 13 | +export { BottomNavigationComponent } from "./components/page/BottomNavigationComponent" |
| 14 | 14 | ||
| 15 | -export { TopNavigationComponent } from "./components/view/TopNavigationComponent" | 15 | +export { TopNavigationComponent } from "./components/page/TopNavigationComponent" |
| 16 | 16 | ||
| 17 | export { LabelComponent } from "./components/view/LabelComponent" | 17 | export { LabelComponent } from "./components/view/LabelComponent" |
| 18 | 18 | ||
| @@ -20,3 +20,5 @@ export { SmallVideoCardComponent } from "./components/view/SmallVideoCardCompone | @@ -20,3 +20,5 @@ export { SmallVideoCardComponent } from "./components/view/SmallVideoCardCompone | ||
| 20 | 20 | ||
| 21 | export { BannerComponent } from "./components/view/BannerComponent" | 21 | export { BannerComponent } from "./components/view/BannerComponent" |
| 22 | 22 | ||
| 23 | +export { ColumnPageComponent } from "./components/page/ColumnPageComponent" | ||
| 24 | + |
| @@ -3,7 +3,7 @@ import { Logger } from 'wdKit'; | @@ -3,7 +3,7 @@ import { Logger } from 'wdKit'; | ||
| 3 | import { TopNavigationComponent } from './TopNavigationComponent'; | 3 | import { TopNavigationComponent } from './TopNavigationComponent'; |
| 4 | import { BottomNavDTO } from '../../repository/bean/BottomNavDTO'; | 4 | import { BottomNavDTO } from '../../repository/bean/BottomNavDTO'; |
| 5 | import { UIUtils } from '../../repository/UIUtils'; | 5 | import { UIUtils } from '../../repository/UIUtils'; |
| 6 | -import { MinePageComponent } from '../page/MinePageComponent'; | 6 | +import { MinePageComponent } from './MinePageComponent'; |
| 7 | import PageViewModel from '../../viewmodel/PageViewModel'; | 7 | import PageViewModel from '../../viewmodel/PageViewModel'; |
| 8 | 8 | ||
| 9 | const TAG = 'BottomNavigationComponent'; | 9 | const TAG = 'BottomNavigationComponent'; |
| 1 | +import { PageComponent } from './PageComponent'; | ||
| 2 | + | ||
| 3 | +const TAG = 'ColumnPageComponent'; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 二级栏目页面,展排数据 | ||
| 7 | + */ | ||
| 8 | +@Component | ||
| 9 | +export struct ColumnPageComponent { | ||
| 10 | + @State currentTopNavSelectedIndex: number = 0; | ||
| 11 | + pageId: string = ""; | ||
| 12 | + channelId: string = ""; | ||
| 13 | + | ||
| 14 | + build() { | ||
| 15 | + PageComponent({ | ||
| 16 | + currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 17 | + navIndex: this.currentTopNavSelectedIndex, | ||
| 18 | + pageId: this.pageId, | ||
| 19 | + channelId: this.channelId, | ||
| 20 | + }); | ||
| 21 | + | ||
| 22 | + } | ||
| 23 | +} | ||
| 24 | + |
| 1 | import { LazyDataSource, Logger } from 'wdKit'; | 1 | import { LazyDataSource, Logger } from 'wdKit'; |
| 2 | import { CompDTO } from '../../repository/bean/CompDTO'; | 2 | import { CompDTO } from '../../repository/bean/CompDTO'; |
| 3 | import { TopNavDTO } from '../../repository/bean/TopNavDTO'; | 3 | import { TopNavDTO } from '../../repository/bean/TopNavDTO'; |
| 4 | -import { PageComponent } from '../page/PageComponent'; | 4 | +import { PageComponent } from './PageComponent'; |
| 5 | 5 | ||
| 6 | const TAG = 'TopNavigationComponent'; | 6 | const TAG = 'TopNavigationComponent'; |
| 7 | 7 |
-
Please register or login to post a comment