weaver_trunk_cli/pc4mobx/prj/stores/util/pagination.js

13 lines
327 B
JavaScript

import { observable, action } from "mobx";
export default class PaginationStore {
@observable pageSize = 10;
@observable current = 1;
@observable total = 0;
@action
onChange = (current = this.current, pageSize = this.pageSize) => {
this.current = current;
this.pageSize = pageSize;
}
}