fix: 修复iOS日历无法正常显示的情况

This commit is contained in:
kuaifan 2024-10-22 20:39:09 +08:00
parent a97d78bbf4
commit e2e7bc8d72
3 changed files with 8 additions and 3 deletions

View File

@ -293,7 +293,7 @@ export default {
currentCalendarDate(format) { currentCalendarDate(format) {
const cal = this.$refs.cal.getInstance(); const cal = this.$refs.cal.getInstance();
let currentDate = $A.dayjs([cal.getDate().getFullYear(), cal.getDate().getMonth() + 1, cal.getDate().getDate()]); const currentDate = $A.dayjs(cal.getDate().toDate());
return currentDate.format(format); return currentDate.format(format);
}, },

View File

@ -122,7 +122,7 @@ export default {
}, },
generateCalendar() { generateCalendar() {
let today = $A.daytz().startOf('day') let today = $A.daytz().startOf('day')
let one = $A.dayjs([this.year, this.month, 1]) let one = $A.dayjs(`${this.year}-${this.month}-1`)
let calcTime = one.valueOf() - one.day() * 86400 * 1000 let calcTime = one.valueOf() - one.day() * 86400 * 1000
let array = [] let array = []
for (let i = 0; i < 6; i++) { for (let i = 0; i < 6; i++) {
@ -190,6 +190,7 @@ export default {
.calendar-header-menu { .calendar-header-menu {
position: relative; position: relative;
flex: 1; flex: 1;
width: 0;
} }
.calendar-header-back { .calendar-header-back {
margin-right: 14px; margin-right: 14px;
@ -208,6 +209,10 @@ export default {
justify-content: center; justify-content: center;
} }
h4 { h4 {
padding: 0 50px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
line-height: 40px; line-height: 40px;
background-color: #fff; background-color: #fff;
text-align: center; text-align: center;

View File

@ -239,7 +239,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 100vw; max-width: 100vw;
overflow: auto;
.ivu-modal-wrap-apply-title { .ivu-modal-wrap-apply-title {
line-height: 40px; line-height: 40px;
@ -253,6 +252,7 @@
cursor: pointer; cursor: pointer;
color: #2b85e4; color: #2b85e4;
font-size: 14px; font-size: 14px;
padding-left: 8px;
} }
@media (max-width: 500px) { @media (max-width: 500px) {