diff --git a/web/src/components/PageScrollList/index.tsx b/web/src/components/PageScrollList/index.tsx index f3ef0f86..cd679dbf 100644 --- a/web/src/components/PageScrollList/index.tsx +++ b/web/src/components/PageScrollList/index.tsx @@ -126,7 +126,6 @@ const PageScrollList = forwardRef(>({ // 内容不足以填满容器时,主动继续加载 setTimeout(() => { const el = scrollRef.current; - console.log(el, el?.scrollHeight, el?.clientHeight, hasMoreRef.current) if (el && hasMoreRef.current && el.scrollHeight <= el.clientHeight) { loadMoreData(); } diff --git a/web/src/main.tsx b/web/src/main.tsx index e0695c5e..3e86feae 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -1,10 +1,22 @@ +/* + * @Author: ZhaoYing + * @Date: 2025-12-02 20:28:01 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-04-17 14:19:14 + */ import { createRoot } from 'react-dom/client' import '@/styles/index.css' import App from '@/App.tsx' -// 同步导入i18n配置以确保在组件渲染前初始化完成 +// Synchronously import i18n config to ensure initialization before component rendering import './i18n' +// After a new release, old dynamic chunk files are deleted; force a page reload on preload error +window.addEventListener('vite:preloadError', () => { + console.warn('New version detected, reloading page to load latest assets...') + window.location.reload() +}) + createRoot(document.getElementById('root')!) .render(