Skip to content

Commit 615aa3a

Browse files
committed
修复删除最后一个列表数据,重新加载数据报错
1 parent c37ea86 commit 615aa3a

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

server/resource/template/web/table.vue.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export default {
228228
type: 'success',
229229
message: '删除成功'
230230
})
231-
if (this.tableData.length == ids.length) {
231+
if (this.tableData.length == ids.length && this.page > 1) {
232232
this.page--;
233233
}
234234
this.deleteVisible = false
@@ -272,7 +272,7 @@ export default {
272272
type: "success",
273273
message: "删除成功"
274274
});
275-
if (this.tableData.length == 1) {
275+
if (this.tableData.length == 1 && this.page > 1 ) {
276276
this.page--;
277277
}
278278
this.getTableData();

web/src/view/example/customer/customer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default {
125125
type: "success",
126126
message: ""
127127
});
128-
if (this.tableData.length == 1) {
128+
if (this.tableData.length == 1 && this.page > 1 ) {
129129
this.page--;
130130
}
131131
this.getTableData();

web/src/view/example/upload/upload.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default {
116116
type: "success",
117117
message: "删除成功!"
118118
});
119-
if (this.tableData.length == 1) {
119+
if (this.tableData.length == 1 && this.page > 1 ) {
120120
this.page--;
121121
}
122122
this.getTableData();

web/src/view/superAdmin/api/api.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export default {
199199
type:"success",
200200
message:res.msg
201201
})
202-
if (this.tableData.length == ids.length) {
202+
if (this.tableData.length == ids.length && this.page > 1) {
203203
this.page--;
204204
}
205205
this.deleteVisible = false
@@ -265,7 +265,7 @@ export default {
265265
type: "success",
266266
message: "删除成功!"
267267
});
268-
if (this.tableData.length == 1) {
268+
if (this.tableData.length == 1 && this.page > 1 ) {
269269
this.page--;
270270
}
271271
this.getTableData();

web/src/view/superAdmin/authority/authority.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export default {
191191
type: "success",
192192
message: "删除成功!"
193193
});
194-
if (this.tableData.length == 1) {
194+
if (this.tableData.length == 1 && this.page > 1 ) {
195195
this.page--;
196196
}
197197
this.getTableData();

web/src/view/superAdmin/dictionary/sysDictionary.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export default {
220220
type: "success",
221221
message: "删除成功"
222222
});
223-
if (this.tableData.length == 1) {
223+
if (this.tableData.length == 1 && this.page > 1 ) {
224224
this.page--;
225225
}
226226
this.getTableData();

web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export default {
209209
type: "success",
210210
message: "删除成功"
211211
});
212-
if (this.tableData.length == 1) {
212+
if (this.tableData.length == 1 && this.page > 1 ) {
213213
this.page--;
214214
}
215215
this.getTableData();

web/src/view/superAdmin/menu/menu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export default {
324324
type: "success",
325325
message: "删除成功!"
326326
});
327-
if (this.tableData.length == 1) {
327+
if (this.tableData.length == 1 && this.page > 1 ) {
328328
this.page--;
329329
}
330330
this.getTableData();

web/src/view/superAdmin/operation/sysOperationRecord.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export default {
177177
type: "success",
178178
message: "删除成功"
179179
});
180-
if (this.tableData.length == ids.length) {
180+
if (this.tableData.length == ids.length && this.page > 1) {
181181
this.page--;
182182
}
183183
this.deleteVisible = false;
@@ -192,7 +192,7 @@ export default {
192192
type: "success",
193193
message: "删除成功"
194194
});
195-
if (this.tableData.length == 1) {
195+
if (this.tableData.length == 1 && this.page > 1 ) {
196196
this.page--;
197197
}
198198
this.getTableData();

0 commit comments

Comments
 (0)