You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using type: 'loop' with Splide, the library seems creates cloned slides directly in the DOM to simulate an infinite loop. These clones are not Vue components — they are static HTML copies and do not go through Vue’s lifecycle (setup(), onMounted(), etc.).
As a result, any logic relying on Vue's reactivity or lifecycle (such as initializing an ECharts instance) seems does not run. The charts are not rendered in these cloned slides. Even calling .resize() manually does nothing, since ECharts was never initialized.
Switching to type: 'slide' resolves the issue, because all slides are actual Vue components and lifecycle hooks are respected.
Is there a way to use loop: true while ensuring that slides are cloned as actual Vue components? Or alternatively, is there a way to disable DOM cloning and use Vue-based slide rendering instead?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello !
When using type: 'loop' with Splide, the library seems creates cloned slides directly in the DOM to simulate an infinite loop. These clones are not Vue components — they are static HTML copies and do not go through Vue’s lifecycle (setup(), onMounted(), etc.).
As a result, any logic relying on Vue's reactivity or lifecycle (such as initializing an ECharts instance) seems does not run. The charts are not rendered in these cloned slides. Even calling .resize() manually does nothing, since ECharts was never initialized.
Switching to type: 'slide' resolves the issue, because all slides are actual Vue components and lifecycle hooks are respected.
Is there a way to use loop: true while ensuring that slides are cloned as actual Vue components? Or alternatively, is there a way to disable DOM cloning and use Vue-based slide rendering instead?
Context:
Thank you !
Beta Was this translation helpful? Give feedback.
All reactions