更新大屏
This commit is contained in:
@ -132,10 +132,18 @@ const props = defineProps({
|
||||
tableHeight: {
|
||||
type: Number || String,
|
||||
},
|
||||
// 在自动滚动中,想滚动到底部,是否请求下一页
|
||||
hasNext: {
|
||||
type: Number,
|
||||
default: false
|
||||
},
|
||||
|
||||
// 自动滚动
|
||||
isScroll: {
|
||||
type: Number,
|
||||
default: false
|
||||
},
|
||||
|
||||
customClass: {
|
||||
type: String
|
||||
},
|
||||
@ -333,6 +341,8 @@ const createScroll = () => {
|
||||
timer.value = setInterval(() => {
|
||||
target.scrollTop += 1;
|
||||
if (target.scrollTop >= originalBodyHeight.value) {
|
||||
// 滚动到底部没有下一页了,循环滚动 ,
|
||||
if(props.hasNext) emit("changePage");
|
||||
target.scrollTop -= originalBodyHeight.value;
|
||||
}
|
||||
}, 20);
|
||||
|
||||
Reference in New Issue
Block a user