fix: 处理分页筛选不重置page问题

This commit is contained in:
ZhuRui
2026-08-06 15:46:34 +08:00
parent d85333d058
commit 98b073e8f5
11 changed files with 44 additions and 11 deletions
@@ -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);
+4 -1
View File
@@ -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);
+4 -1
View File
@@ -89,7 +89,10 @@ export function useUserModel() {
});
// ===== 事件处理 =====
const handleSearch = () => fetchList();
const handleSearch = () => {
pagination.reset();
fetchList();
};
const handleReset = async () => {
filterForm.nickname = '';