我用的是机车卷轴和nuxt3。这是我的回购:https://github.com/cyprianwaclaw/nuxt.git
我在布局/滚动中导入了async locomotive-scroll,并在主应用程序中添加了这个布局,但是滚动并不顺利。
我的样式在资产/css/tailwindcss文件中。
我如何使滚动顺利在我的项目?
在我的控制台中,我有一个错误:
locomotive-scroll.esm.526a65ed.mjs:7
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'offsetHeight')
at n.value (locomotive-scroll.esm.526a65ed.mjs:7:11013)
at n.value (locomotive-scroll.esm.526a65ed.mjs:7:10771)
at s.value (locomotive-scroll.esm.526a65ed.mjs:7:29026)
at new s (locomotive-scroll.esm.526a65ed.mjs:7:28450)
at scroll.70d56592.mjs:1:397 发布于 2022-09-29 17:45:23
尝试在nuxt.confi.ts中添加css样式:
css: [
'~/assets/css/tailwind.css',
'locomotive-scroll/dist/locomotive-scroll.css',
],https://stackoverflow.com/questions/73824855
复制相似问题