fix: 🐛 解决几个发现的重置bug

This commit is contained in:
Yer
2023-09-14 18:07:42 +08:00
parent 4f915a32b6
commit 54be87efea
4 changed files with 29 additions and 11 deletions

View File

@@ -277,9 +277,14 @@ export default {
this.getDataList(); this.getDataList();
}, },
handleReset() { handleReset() {
this.searchForm = {}; this.searchForm = {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
sort: "startTime", // 默认排序字段
order: "desc", // 默认排序方式
};
this.selectDate = ""; this.selectDate = "";
this.searchForm.pageNumber = 1;
this.getDataList(); this.getDataList();
}, },
clearSelectAll() { clearSelectAll() {

View File

@@ -168,9 +168,13 @@ export default {
// 重置 // 重置
handleReset () { handleReset () {
this.selectDate = ""; this.selectDate = "";
this.searchForm = {}; this.searchForm = {
this.searchForm.pageNumber = 1; // 搜索框初始化对象
this.searchForm.pageSize = 10; pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
sort: "startTime", // 默认排序字段
order: "desc", // 默认排序方式
};
this.getDataList(); this.getDataList();
}, },
// 编辑 // 编辑

View File

@@ -205,10 +205,15 @@ export default {
}, },
// 重置 // 重置
handleReset() { handleReset() {
this.searchForm = {}; this.searchForm = {
// 搜索框初始化对象
pageNumber: 0, // 当前页数
pageSize: 10, // 页面大小
sort: "startTime",
order: "desc", // 默认排序方式
};
this.selectDate = ""; this.selectDate = "";
this.searchForm.pageNumber = 0;
this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
// 时间段分别赋值 // 时间段分别赋值

View File

@@ -145,10 +145,14 @@ export default {
}, },
// 重置 // 重置
handleReset () { handleReset () {
this.searchForm = {}; this.searchForm = {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
sort: "startTime",
order: "desc", // 默认排序方式
};
this.selectDate = ""; this.selectDate = "";
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
// 管理 // 管理