update Page obj
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user