fix: 列表当前页被删除空后页码减一
This commit is contained in:
@@ -715,6 +715,14 @@
|
||||
this.getAlertList();
|
||||
}
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
//是否存在分页缓存
|
||||
|
||||
@@ -503,6 +503,14 @@
|
||||
this.bottomBox.ruleDetail = this.convertToDetail(n);
|
||||
}
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off("alert-rule-list-change");
|
||||
|
||||
@@ -691,6 +691,14 @@
|
||||
showSubList(n) {
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
//是否存在分页缓存
|
||||
|
||||
@@ -452,6 +452,14 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
//是否存在分页缓存
|
||||
|
||||
@@ -510,6 +510,14 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy(){
|
||||
bus.$off("dc-list-change");
|
||||
|
||||
@@ -345,6 +345,16 @@
|
||||
this.getTableData();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
|
||||
@@ -365,6 +365,14 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
||||
|
||||
@@ -445,6 +445,14 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -293,6 +293,16 @@
|
||||
this.getTableData();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||
this.pageNo(this.pageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
|
||||
@@ -836,6 +836,14 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
endpointTableData: {
|
||||
deep: true,
|
||||
handler(n) {
|
||||
if (n.length === 0 && this.endpointPageObj.pageNo > 1) {
|
||||
this.endpointPageNo(this.endpointPageObj.pageNo-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off("project-page-type");
|
||||
|
||||
Reference in New Issue
Block a user