feat: can set rootMargin for IntersectionObserver.

This commit is contained in:
Gabe
2025-10-30 01:03:46 +08:00
parent a9bffe3913
commit 7361a94f8c
3 changed files with 4 additions and 4 deletions

View File

@@ -544,7 +544,7 @@ export class Translator {
// 监控翻译单元的可见性
#createIntersectionObserver() {
const { transInterval, rootMargin = 200 } = this.#setting;
const { transInterval, rootMargin = 500 } = this.#setting;
const pending = new Set();
const flush = debounce(() => {