refactor(PageContent): ♻️ 点击表格刷新按钮不重置页码
This commit is contained in:
@@ -433,7 +433,7 @@ function handleSelectionChange(selection: any[]) {
|
|||||||
}
|
}
|
||||||
// 刷新
|
// 刷新
|
||||||
function handleRefresh() {
|
function handleRefresh() {
|
||||||
fetchPageData({}, true);
|
fetchPageData(lastFormData);
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
function handleDelete(id?: number | string) {
|
function handleDelete(id?: number | string) {
|
||||||
@@ -451,7 +451,7 @@ function handleDelete(id?: number | string) {
|
|||||||
if (props.contentConfig.deleteAction) {
|
if (props.contentConfig.deleteAction) {
|
||||||
props.contentConfig.deleteAction(ids).then(() => {
|
props.contentConfig.deleteAction(ids).then(() => {
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
handleRefresh();
|
fetchPageData({}, true);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error("未配置deleteAction");
|
ElMessage.error("未配置deleteAction");
|
||||||
|
|||||||
Reference in New Issue
Block a user