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
王士厅
2024-05-21 20:26:06 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
d6fb485fa246e64589701539d96ac74bf563ba66
d6fb485f
2 parents
c25d73d8
336d3c43
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
15 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
d6fb485
...
...
@@ -87,13 +87,12 @@ export struct PageComponent {
ListItem() {
if (this.pageModel.hasMore) {
LoadMoreLayout({ isVisible: this.pageModel.isVisiblePullUpLoad })
} else
if (!this.pageModel.contentNeedScroll)
{
} else {
PageNoMoreLayout({ noMoreBean: new NoMoreBean(this.pageModel.pageInfo.baselineCopywriting) })
}
}
}
// comp自己处理分页,这里设置EdgeEffect.None
.edgeEffect(this.pageModel.contentNeedScroll ? EdgeEffect.None : EdgeEffect.Spring)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.cachedCount(5)
.height(CommonConstants.FULL_PARENT)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
View file @
d6fb485
...
...
@@ -141,7 +141,7 @@ struct ThemeListPage {
// refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,
// this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
// })
} else
if (!this.pageModel.contentNeedScroll)
{
} else {
PageNoMoreLayout({ noMoreBean: new NoMoreBean(this.pageModel.pageInfo.baselineCopywriting) })
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
d6fb485
...
...
@@ -35,6 +35,9 @@ export struct TopNavigationComponent {
@Link _currentNavIndex?: number;
// 顶导当前选中/焦点下标
@State currentTopNavSelectedIndex: number = 0;
/**
* @deprecated TODO,没地方用到,是否弃用
*/
@State currentTopNavName: string = '';
@State currentTopNavItem: TopNavDTO = {} as TopNavDTO
// 顶导数据
...
...
@@ -154,7 +157,7 @@ export struct TopNavigationComponent {
// 崩溃
// this.currentTopNavName = this._currentNavIndex === 0 ? this.myChannelList[0].name : this.topNavList[0].name
if (this._currentNavIndex === 0 && this.myChannelList && this.myChannelList.length > 0 &&
if (this._currentNavIndex === 0 && this.myChannelList && this.myChannelList.length > 0 &&
this.myChannelList[0] &&
this.myChannelList[0].name) {
this.currentTopNavName = this.myChannelList[0].name
} else if (this._currentNavIndex != 0 && this.topNavList && this.topNavList.length > 0 && this.topNavList[0].name) {
...
...
@@ -170,19 +173,19 @@ export struct TopNavigationComponent {
this.currentTopNavItem = this.myChannelList[this.currentTopNavSelectedIndex]
}
isBroadcast(item: TopNavDTO) {
isBroadcast(item
?
: TopNavDTO) {
// TODO 用id channelId = '2066'
return item.name === '播报'
return item
?
.name === '播报'
}
isLayout(item: TopNavDTO) {
isLayout(item
?
: TopNavDTO) {
// TODO 用id channelId = '2006'
return item.name === '版面'
return item
?
.name === '版面'
}
isSpecialChannel(item: TopNavDTO) {
isSpecialChannel(item
?
: TopNavDTO) {
// 版面、播报,可以用这个判断
return item.channelType === 3
return item
?
.channelType === 3
}
...
...
@@ -374,7 +377,7 @@ export struct TopNavigationComponent {
@Builder
tabBarBuilder(item: TopNavDTO, index: number) {
Column() {
Text(item.name)
Text(item
?
.name)
.fontSize($r('app.float.selected_text_size'))
.fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
.fontColor(this.currentTopNavSelectedIndex === index ? Color.Black : "#999999")
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageModel.ets
View file @
d6fb485
...
...
@@ -24,9 +24,6 @@ export default class PageModel {
// 当前请求数据的group
groupData: GroupInfoDTO = {} as GroupInfoDTO;
compList: LazyDataSource<BaseDTO> = new LazyDataSource();
// 是否comp自己处理分页加载;默认是最后一个comp下的content有分页数据,需要节目内容的分页加载
// (如:首页-视频tab-直播tab,最后一个comp是直播回看列表,视频内容需要分页加载)
contentNeedScroll: boolean = false;
// 页面状态,刷新、加载更多等,1-首次、2-下拉、3上拉
loadStrategy: number = 1;
currentPage: number = 1;
...
...
Please
register
or
login
to post a comment