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
wangyujian_wd
2024-03-26 10:50:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e22111531131d1733d05a47c1c24f53bac88c9b5
e2211153
1 parent
e71463ea
fix:
1)电子版-日历和期刊弹窗和联动优化;
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperCalendarDialog.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
e221115
...
...
@@ -22,6 +22,8 @@ export struct ENewspaperPageComponent {
@State calendarDate: string = ''
private swiperController: SwiperController = new SwiperController()
@State swiperIndex: number = 0;
//当前选择的日期标记
@State selectDate: Date = new Date()
//watch监听报纸页码回调
onCurrentPageNumUpdated(): void {
...
...
@@ -34,6 +36,7 @@ export struct ENewspaperPageComponent {
//日历选择弹框
calendarDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperCalendarDialog({
selectDate: this.selectDate,
onDateChange: (date: RMCalendarBean) => {
console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date))
if (date.fullYear && date.month && date.date) {
...
...
@@ -41,6 +44,7 @@ export struct ENewspaperPageComponent {
this.calendarDate = `${date.fullYear}-${month > 9 ? month : '0' + month}-${date.date > 9 ? date.date : '0' + date.date}`
this.getNewspaperTime()
this.getNewspaperList()
this.selectDate = new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0)
}
}
}),
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperCalendarDialog.ets
View file @
e221115
...
...
@@ -6,11 +6,14 @@ export struct ENewspaperCalendarDialog {
calendarDialogController?: CustomDialogController
// 选择变化监听,
onDateChange?: (date: RMCalendarBean) => void
//当前选择的日期标记
@Prop selectDate: Date = new Date()
build() {
RMCalendar({
// 开始日期
startDate: new Date(2000, 1, 1),
selectDay: this.selectDate,
// 截止日期
endDate: new Date(),
// 日期选择变化监听
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
View file @
e221115
...
...
@@ -32,8 +32,8 @@ export struct ENewspaperListDialog {
console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
let _scrollIndex = Number.parseInt(this.currentPageNum)
console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "_scrollIndex:", _scrollIndex)
this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
this.listScroller.scrollToIndex(this.scrollIndex)
let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
this.listScroller.scrollToIndex(scrollIndexEnd)
}
aboutToAppear(): void {
...
...
Please
register
or
login
to post a comment