fix: 修复model翻页异常的问题
This commit is contained in:
@@ -308,6 +308,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
pageNo(val) {
|
pageNo(val) {
|
||||||
|
console.info(val)
|
||||||
this.pageObj.pageNo = val;
|
this.pageObj.pageNo = val;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
@@ -373,9 +374,6 @@
|
|||||||
tableData: {
|
tableData: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler(n) {
|
handler(n) {
|
||||||
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
|
||||||
this.pageNo(this.pageObj.pageNo-1);
|
|
||||||
}
|
|
||||||
if(!this.delFlag){ // 不是删除时回到顶部
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
this.$refs.modelTable.bodyWrapper.scrollTop = 0
|
this.$refs.modelTable.bodyWrapper.scrollTop = 0
|
||||||
}else{
|
}else{
|
||||||
@@ -387,7 +385,7 @@
|
|||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if(this.scrollbarWrap){
|
if(this.scrollbarWrap){
|
||||||
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user