修复了在当前表格当前页删除为空的情况下页面被锁死的bug
This commit is contained in:
@@ -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();
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user