Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Swup 库来实现页面转换,效果很好,但我需要使用 2 个插件(脚本和正文类)。我一定错过了一些东西,因为我不能让两者都工作,只有最后一个被调用的工作。有没有办法让 Swup 拥有超过 1 个插件?
您能否展示包含多个插件的代码是什么?
你必须使用类似的东西:
const options = { plugins: [ new SwupScriptsPlugin(), new SwupBodyClassPlugin() ], }; const swup = new Swup(options);