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