如何将 Lottie Interactivity 与 Svelte 集成
我正在尝试将 Lottie Interactivity 集成到我的 Svelte 代码中。不幸的是,开箱即用的它会抛出错误代码。
当你深入研究他们的文档时,他们提供了 React 和 Vue 的钩子 - 但没有 Svelte!
我对 Svelte 还比较陌生,所以如果人们甚至可以提供有关如何开始将其集成到 Svelte 中的指示,我将不胜感激!
(在有人问之前,我说的是 Lottie Interactivity,而不是 Lottie Player。)
I'm trying to integrate Lottie Interactivity into my Svelte code. Unfortunately, out-of-the-box it throws error codes.
When you dig into their docs, they provide hooks for React and Vue — but no Svelte!
I'm still relatively new with Svelte, so if people can even provide pointers as to how to get started with integrating this into Svelte, I would greatly appreciate this!
(And before anyone asks — I'm talking about Lottie Interactivity, not Lottie Player.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来您必须侦听加载事件才能创建动画 REPL
Looks like you have to listen for the load event to create the animation REPL
在第一页渲染期间它可能会说
,它可能会在控制台中显示此错误: 。
为了消除这个问题,我们需要在 onMount 方法中导入包。这是 REPL
During first page render it may say
and it may show this error in the console: .
To eliminate this issue, we need to import the packages in onMount method. Here is the REPL