fix calendar layout style
This commit is contained in:
@ -3,13 +3,13 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 32rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.year {
|
.year {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 16rpx 0;
|
padding: 16rpx 32rpx;
|
||||||
|
background: var(--theme-bg-secondary);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -18,7 +18,6 @@
|
|||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: var(--theme-bg-card);
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -37,6 +36,7 @@
|
|||||||
|
|
||||||
.weekdays {
|
.weekdays {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
padding: 0 32rpx;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
grid-template-columns: repeat(7, 1fr);
|
grid-template-columns: repeat(7, 1fr);
|
||||||
|
|
||||||
@ -54,14 +54,13 @@
|
|||||||
padding-bottom: 256rpx;
|
padding-bottom: 256rpx;
|
||||||
|
|
||||||
.month {
|
.month {
|
||||||
margin-bottom: 48rpx;
|
padding: 0 32rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
color: var(--theme-text);
|
color: var(--theme-text);
|
||||||
padding: 16rpx 0;
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 16rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.days {
|
.days {
|
||||||
|
|||||||
@ -143,8 +143,8 @@ Component({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下个月需要显示的日期(补齐到 42 个格子,6 行)
|
// 下个月需要显示的日期(补齐到 35 个格子,6 行)
|
||||||
const remainingDays = 42 - days.length;
|
const remainingDays = 35 - days.length;
|
||||||
for (let day = 1; day <= remainingDays; day++) {
|
for (let day = 1; day <= remainingDays; day++) {
|
||||||
const nextMonth = month === 12 ? 1 : month + 1;
|
const nextMonth = month === 12 ? 1 : month + 1;
|
||||||
const nextYear = month === 12 ? year + 1 : year;
|
const nextYear = month === 12 ? year + 1 : year;
|
||||||
|
|||||||
Reference in New Issue
Block a user