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-06-20 19:00:58 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
93a9cc98feca3882c640aa90b9c878ffb4ffa262
93a9cc98
1 parent
a2a1952d
电子报一多优化
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/calendar/RMCalendar.ets
sight_harmony/features/wdComponent/src/main/ets/components/skeleton/newsSkeleton.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
93a9cc9
...
...
@@ -174,6 +174,8 @@ export struct ENewspaperPageComponent {
resizeWindow() {
this.windowClass?.on('windowSizeChange', () => {
this.resize()
this.getNewspaperList()
this.swiperController.changeIndex(this.swiperIndex)
});
}
resize() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/calendar/RMCalendar.ets
View file @
93a9cc9
import { RMCalendarBean } from './RMCalendarBean'
import { RMCalenderCell } from './RMCalendarCell'
import { ToastUtils, NetworkUtil } from 'wdKit/Index';
import { ToastUtils, NetworkUtil, WindowModel } from 'wdKit/Index';
import { window } from '@kit.ArkUI';
@Component
export struct RMCalendar {
private windowClass?: window.Window;
@State selectItem: RMCalendarBean = new RMCalendarBean()
//选中的日期
private selectDay: Date = new Date()
...
...
@@ -70,6 +72,7 @@ export struct RMCalendar {
onMonthChange?: (after: Date, befor: Date) => void
// 不可选中项的点击事件
disableCellClick?: (item: RMCalendarBean) => void
@State isZD: boolean = false // 存储是否折叠屏
@Builder
createWeekTitle(item: string) {
...
...
@@ -165,6 +168,24 @@ export struct RMCalendar {
temp.time = this.selectDay.getTime()
this.selectItem = temp
this.calcData()
this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口
let screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZD = screenWidth > 2000 ? true : false
this.resizeWindow()
}
aboutToDisappear() {
this.windowClass?.off('windowSizeChange');
}
resizeWindow() {
this.windowClass?.on('windowSizeChange', () => {
this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口
let screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZD = screenWidth > 2000 ? true : false
});
}
/**
...
...
@@ -343,6 +364,7 @@ export struct RMCalendar {
{ bottom: 20 })
.border({ radius: 4 })
}
.width(this.isZD ? "50%" : "100%")
}
getMonthStr(month?: number): string {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/skeleton/newsSkeleton.ets
View file @
93a9cc9
...
...
@@ -118,8 +118,13 @@ export struct newsSkeleton {
left: 15
})
if (this.showBottom) {
Column().backgroundColor('#CBCBCB').height(5).width(339)
Column().backgroundColor('#909090').height(5).width(326)
// Column().backgroundColor('#CBCBCB').height(5).width(339)
// Column().backgroundColor('#909090').height(5).width(336)
Image($r('app.media.newspaper_shadow'))
.height($r('app.float.vp_12'))
.width("97%")
.objectFit(ImageFit.Contain)
.margin({ top: -1 })
}
}
.width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
View file @
93a9cc9
...
...
@@ -136,8 +136,12 @@ export struct ENewspaperListDialog {
Image($r('app.media.line'))
.width('100%')
.height(6)
.margin({ top: 20, left: 16, right: 16 })
.objectFit(ImageFit.Contain)
.margin({ top: 20 })
.padding({
left: 16,
right: 16
})
.objectFit(ImageFit.Fill)
}
.width('100%')
.gesture(
...
...
Please
register
or
login
to post a comment