update Page obj

This commit is contained in:
Timi
2025-12-08 17:14:00 +08:00
parent a25c38d50d
commit 71fc077726
5 changed files with 34 additions and 18 deletions

View File

@ -1,5 +1,6 @@
// components/journal-list/index.ts
import config from "../../config/index";
import { JournalPage, JournalPageType } from "../../types/Journal";
import Time from "../../utils/Time";
export type JournalListItem = {
@ -14,11 +15,7 @@ interface JournalListData {
list: JournalListItem[];
isFetching: boolean;
isFinished: boolean;
page: {
index: number;
size: number;
type?: string;
};
page: JournalPage;
}
Component({
@ -45,8 +42,8 @@ Component({
isFinished: false,
page: {
index: 0,
size: 20,
type: undefined
size: 16,
type: JournalPageType.PREVIEW
}
},
observers: {
@ -55,12 +52,12 @@ Component({
this.fetch();
}
},
'type': function(type: string) {
'type': function() {
this.setData({
page: {
index: 0,
size: 20,
type
size: 16,
type: JournalPageType.PREVIEW
},
list: [],
isFinished: false