修复了在当前表格当前页删除为空的情况下页面被锁死的bug

This commit is contained in:
QM303176530
2020-12-27 17:20:54 +08:00
parent 5c78ecc2d3
commit 2547ba88ae
18 changed files with 351 additions and 303 deletions
@@ -106,10 +106,10 @@ export default {
mixins: [infoList],
data() {
var mustUint = (rule, value, callback) => {
if (!(/^[0-9]*[1-9][0-9]*$/).test(value)){
return callback(new Error("请输入正整数"));
}
return callback()
if (!/^[0-9]*[1-9][0-9]*$/.test(value)) {
return callback(new Error("请输入正整数"));
}
return callback();
};
return {
@@ -136,7 +136,7 @@ export default {
rules: {
authorityId: [
{ required: true, message: "请输入角色ID", trigger: "blur" },
{validator: mustUint, trigger: 'blur' }
{ validator: mustUint, trigger: "blur" }
],
authorityName: [
{ required: true, message: "请输入角色名", trigger: "blur" }
@@ -191,6 +191,9 @@ export default {
type: "success",
message: "删除成功!"
});
if (this.tableData.length == 1) {
this.page--;
}
this.getTableData();
}
})