if ('scrollRestoration' in history) { history.scrollRestoration = 'manual'; } // 强制清空滚动位置(不依赖 body,直接操作 window) window.scrollTo(0, 0); import './bootstrap'; const $ = window.jQuery; window.$ = $; // 确保全局一致性 import { fInitArticleLoader } from './modules/articles.js'; $(function() { window.scrollTo(0, 0); if ($.fn.infiniteScroll) { fInitArticleLoader(); } });