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
yanlu
2024-05-18 17:52:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
257181b68005aaa4094be1046efcc4150f7dbdbb
257181b6
1 parent
3321477d
fix:17441 无网络时-电子报_选择日期弹窗未全部置灰不可选择展示
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
1 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/calendar/RMCalendarCell.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperCalendarDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
257181b
...
...
@@ -145,6 +145,7 @@ export struct ENewspaperPageComponent {
.onClick(() => {
this.calendarDialogShow = !this.calendarDialogShow
if (this.calendarDialogShow) {
this.calendarDialogController.open()
} else {
this.calendarDialogController.close()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/calendar/RMCalendar.ets
View file @
257181b
...
...
@@ -103,6 +103,10 @@ export struct RMCalendar {
nowFontColor: this.nowFontColor,
disableClick: (item: RMCalendarBean) => {
if (this.disableCellClick) {
if (!NetworkUtil.isNetConnected()) {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
return
}
this.disableCellClick(item)
}
},
...
...
sight_harmony/features/wdComponent/src/main/ets/components/calendar/RMCalendarCell.ets
View file @
257181b
import { RMCalendarBean } from './RMCalendarBean';
import
font from '@ohos.font
';
import
{ ToastUtils, NetworkUtil } from 'wdKit/Index
';
@Component
export struct RMCalenderCell {
...
...
@@ -38,6 +38,12 @@ export struct RMCalenderCell {
}
getItemColor() {
if (!NetworkUtil.isNetConnected()) {
if (this.selectItem && this.selectItem.time == this.item.time) {
return this.selectFontColor
}
return this.disabledFontColor
}
if (!this.isShowSelectBg() && this.item.isNow) {
return this.nowFontColor
} else if (this.item.isPre) {
...
...
@@ -136,10 +142,12 @@ export struct RMCalenderCell {
return
// }
}
if (NetworkUtil.isNetConnected()) {
this.selectItem = this.item
if (this.cellClick) {
this.cellClick(this.item)
}
}
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperCalendarDialog.ets
View file @
257181b
import { RMCalendar } from '../components/calendar/RMCalendar'
import { RMCalendarBean } from '../components/calendar/RMCalendarBean'
import { ToastUtils, NetworkUtil } from 'wdKit/Index';
@CustomDialog
export struct ENewspaperCalendarDialog {
...
...
@@ -26,4 +27,9 @@ export struct ENewspaperCalendarDialog {
}
})
}
aboutToAppear(): void {
if (!NetworkUtil.isNetConnected()) {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment