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
wangliang_wd
2024-09-25 17:47:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c84b376abc12cb171383e5c6658d48efff922351
c84b376a
1 parent
605b9ef4
feat:优化电子报骨架图展示
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
View file @
c84b376
...
...
@@ -46,10 +46,16 @@ export struct ENewspaperItemComponent {
this.contentHeight = event?.contentHeight
}
//
this.isShowSkeleton = false
this.isShowSkeleton = false
})
.objectFit(ImageFit.Contain)
.zIndex(10)
newsSkeleton({showBottom: this.isShowSkeleton})
.visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
.width('100%')
.zIndex(1)
if (this.contentWidth !== 0) {
Canvas(this.context)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
c84b376
...
...
@@ -25,7 +25,6 @@ export struct ENewspaperPageComponent {
@State picHeight: number = 0
@Provide itemPicWidth: number = 0
@Provide itemPicHeight: number = 0
@State isShowSkeleton:boolean = false
@Provide topMargin: number = DisplayUtils.getDeviceHeight()
...
...
@@ -84,7 +83,6 @@ export struct ENewspaperPageComponent {
builder: ENewspaperCalendarDialog({
selectDate: this.selectDate,
onDateChange: (date: RMCalendarBean) => {
this.isShowSkeleton = true
console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date))
if (date.fullYear && date.month && date.date) {
let month: number = date.month + 1
...
...
@@ -256,7 +254,7 @@ export struct ENewspaperPageComponent {
})
.id('e_newspaper_top')
if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0
|| this.isShowSkeleton
) {
if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0) {
newsSkeleton()
.alignRules({
top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom },
...
...
@@ -478,7 +476,6 @@ export struct ENewspaperPageComponent {
let listBean =
await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight)
this.newspaperListBean = listBean;
this.isShowSkeleton = false
} else {
this.showToastTip('网络出小差了,请检查网络后重试')
}
...
...
Please
register
or
login
to post a comment