Codepen vuejs 3 example (CDN) #526
-
Ohayô gozaimasu 👋🏻, i try to use your awesome slider via CDN in this codepen My Javascript: <script>
...
import { Splide, SplideSlide } from "https://cdn.skypack.dev/@splidejs/[email protected]";
export default {
components: { Splide, SplideSlide },
setup() {
const options = { rewind: true, gap : '1rem' };
return { options }
}
};
</script> My HTML: <Splide :options="options">
<SplideSlide class="card">
<img src="https://picsum.photos/seed/picsum/200/300"/>
</SplideSlide>
<SplideSlide class="card">
<img src="https://picsum.photos/seed/picsum/200/300"/>
</SplideSlide>
<SplideSlide class="card">
<img src="https://picsum.photos/seed/picsum/200/300"/>
</SplideSlide>
</Splide> My error :
i don't know if i use the right process, for calling compoment via CDN. Can you tell why i'm wrong ? Here is the link of codepen: https://codepen.io/Sp0ne/pen/YzxdBBw Thanks a lot for your time
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
おはようございます 👋🏻 I'm not familiar with codepen, but the reason is: How about using CodeSandbox? |
Beta Was this translation helpful? Give feedback.
おはようございます 👋🏻
I'm not familiar with codepen, but the reason is:
vuejs/core#4344
How about using CodeSandbox?
https://codesandbox.io/s/basic-7du76?file=/src/App.vue
(Unfortunately, now it's unstable because of codesandbox/codesandbox-client#6194)