mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-10-21 21:45:25 +00:00
自动滚动
This commit is contained in:
@@ -51,7 +51,7 @@ export default defineComponent({
|
|||||||
console.log("get ads ", toRaw(ads.value));
|
console.log("get ads ", toRaw(ads.value));
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
return;
|
// return;
|
||||||
if (stopAutoScroll) {
|
if (stopAutoScroll) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ export default defineComponent({
|
|||||||
const el = elAd.value as HTMLElement;
|
const el = elAd.value as HTMLElement;
|
||||||
|
|
||||||
let left = el.scrollLeft + adWidth;
|
let left = el.scrollLeft + adWidth;
|
||||||
if (el.scrollLeft + el.clientWidth > el.scrollWidth) {
|
if (el.scrollLeft + el.clientWidth >= el.scrollWidth) {
|
||||||
left = 0;
|
left = 0;
|
||||||
}
|
}
|
||||||
el.scrollTo({ left, behavior: "smooth" });
|
el.scrollTo({ left, behavior: "smooth" });
|
||||||
|
Reference in New Issue
Block a user