fix: 处理分页筛选不重置page问题
This commit is contained in:
@@ -132,7 +132,10 @@ export function useBannerModel() {
|
||||
// ===== 方法 =====
|
||||
|
||||
/** 查询 */
|
||||
const handleSearch = () => fetchList();
|
||||
const handleSearch = () => {
|
||||
pagination.reset();
|
||||
fetchList();
|
||||
};
|
||||
|
||||
/** 重置 */
|
||||
const handleReset = useThrottleFn(async () => {
|
||||
|
||||
@@ -96,7 +96,10 @@ export function useEventListModel() {
|
||||
);
|
||||
});
|
||||
|
||||
const handleSearch = () => fetchList();
|
||||
const handleSearch = () => {
|
||||
pagination.reset();
|
||||
fetchList();
|
||||
};
|
||||
|
||||
const handleReset = async () => {
|
||||
Object.assign(filterForm, FILTER_DEFAULTS);
|
||||
|
||||
@@ -120,7 +120,10 @@ export function useLogModel() {
|
||||
);
|
||||
});
|
||||
|
||||
const handleSearch = () => fetchList();
|
||||
const handleSearch = () => {
|
||||
pagination.reset();
|
||||
fetchList();
|
||||
};
|
||||
|
||||
const handleReset = async () => {
|
||||
filterForm.dateRange = null;
|
||||
|
||||
@@ -199,7 +199,10 @@ export function useOrderModel() {
|
||||
},
|
||||
];
|
||||
|
||||
const handleSearch = () => fetchList();
|
||||
const handleSearch = () => {
|
||||
pagination.reset();
|
||||
fetchList();
|
||||
};
|
||||
|
||||
const handleReset = async () => {
|
||||
Object.assign(filterForm, FILTER_DEFAULTS);
|
||||
|
||||
@@ -89,7 +89,10 @@ export function useUserModel() {
|
||||
});
|
||||
|
||||
// ===== 事件处理 =====
|
||||
const handleSearch = () => fetchList();
|
||||
const handleSearch = () => {
|
||||
pagination.reset();
|
||||
fetchList();
|
||||
};
|
||||
|
||||
const handleReset = async () => {
|
||||
filterForm.nickname = '';
|
||||
|
||||
Reference in New Issue
Block a user