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
liyubing
2024-06-25 19:54:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b6a231776e5654a26bf1929105ee1acb5927035e
b6a23177
1 parent
5bd43c80
fix:1)搜索 输入wuhuhuan,缺省图和android不一致,位置未居中,看图
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
b6a2317
...
...
@@ -29,7 +29,8 @@ import { JSON } from '@kit.ArkTS'
import { MoreComponent } from '../cardview/MoreComponent'
import { Card9Component } from '../cardview/Card9Component'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent'
const TAG = "SearchResultContentComponent"
@Component
...
...
@@ -148,7 +149,7 @@ export struct SearchResultContentComponent {
this.data_rmh.push(data)
})
if
(this.data_rmh.length > 0)
{
if
(this.data_rmh.length > 0)
{
this.count = 1
}
//只有一条创作者,获取 创作者信息
...
...
@@ -262,7 +263,7 @@ export struct SearchResultContentComponent {
this.isLoading = false
this.count = this.count === -1 ? 0 : this.count
})
}else {
}
else {
this.hasMore = false
}
}
...
...
@@ -270,12 +271,12 @@ export struct SearchResultContentComponent {
build() {
Column() {
if (this.count == 0) {
// ListHasNoMoreDataUI({ style: 2 })
EmptyComponent({
emptyType: WDViewDefaultType.WDViewDefaultType_NoSearchResult,
emptyButton: false,
}).height('70%')
})
} else {
List({ scroller: this.scroller2 }) {
if (this.data_rmh != null && this.data_rmh.length > 0) {
...
...
@@ -326,12 +327,13 @@ export struct SearchResultContentComponent {
}, (item: ContentDTO, index: number) => index.toString())
//没有更多数据 显示提示
if (!this.hasMore && (this.data.totalCount() > 0|| (this.data_rmh != null && this.data_rmh.length > 0))) {
if (!this.hasMore && (this.data.totalCount() > 0
|| (this.data_rmh != null && this.data_rmh.length > 0))) {
ListItem() {
ListHasNoMoreDataUI()
}
}
}.cachedCount(5)
}
.cachedCount(5)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.height('100%')
...
...
@@ -344,6 +346,7 @@ export struct SearchResultContentComponent {
}
}
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
b6a2317
...
...
@@ -60,6 +60,7 @@ export struct EmptyComponent {
@State emptyButton: boolean = false
@State isBlack: boolean = false // 背景是否为黑色 默认白色
@State timeNum: number = 10
/**
* The empty image width percentage setting.
*/
...
...
Please
register
or
login
to post a comment