Skip to content

Commit 576578f

Browse files
committed
fix 日历概览获取的时候获取了全部的问题
1 parent bac8229 commit 576578f

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 更新日志
22

3+
### v9.51 `2026-05-08`
4+
- fix 日历获取所有日记的问题
5+
- 日历正常展示
6+
37
### v9.50 `2026-04-07`
48
- scss 颜色方法大改,使用最新颜色,替换 @import 方法
59
- 优化 echarts 引入,按需引入,避免文件过大

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"nameZh": "标题日记",
44
"type": "module",
55
"description": "一句话概括你的一天",
6-
"version": "9.5.0",
6+
"version": "9.5.1",
77
"dateModify": "2026.05.08",
88
"dateInit": "2018.08.14",
99
"author": {

src/view/Calendar/CalendarDiary.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const diaryList = ref<Array<EntityDiaryForm>>([])
129129
const formSearch = ref<DiarySearchParamsForCalendar>({
130130
keywords: '',
131131
pageNo: 1,
132-
pageSize: 1000, // 单页请求条数
132+
pageSize: 9999, // 单页请求条数
133133
categories: '',
134134
filterShared: 0, // 1 是筛选,0 是不筛选
135135
@@ -144,8 +144,8 @@ function getAllShowingCalendarDiaries() {
144144
formSearch.value.keywords = JSON.stringify(projectStore.keywords)
145145
formSearch.value.categories = JSON.stringify(projectStore.filteredCategories)
146146
formSearch.value.filterShared = projectStore.isFilterShared ? 1 : 0
147-
formSearch.value.timeStart = projectStore.dateFilterTimeStart || undefined
148-
formSearch.value.timeEnd = projectStore.dateFilterTimeEnd || undefined
147+
formSearch.value.timeStart = minDate.value ? Moment(minDate.value).startOf('day').format('YYYY-MM-DD HH:mm:ss') : ''
148+
formSearch.value.timeEnd = maxDate.value ? Moment(maxDate.value).endOf('day').format('YYYY-MM-DD HH:mm:ss') : ''
149149
diaryList.value = []
150150
151151
isLoading.value = true
@@ -302,8 +302,8 @@ const initPage = ref({
302302
})
303303
304304
// 跟踪当前页面和日期范围
305-
const minDate = ref<Date>()
306-
const maxDate = ref<Date>()
305+
const minDate = ref<Date>(Moment().startOf('year').toDate())
306+
const maxDate = ref<Date>(Moment().endOf('year').toDate())
307307
308308
// 处理日历页面滑动时的变化
309309
function onPageChange(data: any) {

src/view/Calendar/_calendar.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
display: flex;
77
justify-content: flex-start;
88
overflow-y: auto;
9+
background-color: $bg-light;
910
}
1011

1112
// 日历本体
@@ -51,6 +52,9 @@
5152
}
5253

5354
@media (prefers-color-scheme: dark) {
55+
.calendar-container{
56+
background-color: $dark-bg;
57+
}
5458
.calendar-diary-list{
5559
background-color: $dark-bg;
5660
border-left-color: $dark-border;

0 commit comments

Comments
 (0)