実現したいこと
vue3-carouselで
<ol class="carousel__pagination"></ol> が表示されるようにしたい その上でstyleをdot(丸)にしたい前提
Vue3-carousel https://ismail9k.github.io/vue3-carousel/examples.html
を使ってカルーセル(スライドショー)を作っています
<template #addons>
<navigation />
<pagination />
</template>
と書いているにもかかわらず
発生している問題・エラーメッセージ
解析を見ましたが、エラーは特にありません
該当のソースコード
HTML
1 <div id="slider"> 2 <div class="slider interview_area"> 3 <carousel :items-to-show="3" :wrap-around="true" :loop="true" :speed="500"> 4 <template v-for="interview in interviews"> 5 <slide :key="interview.id"> 6 <div class="interview_box"> 7 <img :src="interview.image" alt=""> 8 <div class="interview_txt"> 9 <div class="interview_intit"> 10 {{ interview.title }} 11 </div> 12 <div class="interview_intxt"> 13 {{ interview.content }} 14 </div> 15 </div> 16 </div> 17 </slide> 18 </template> 19 <template #addons> 20 <navigation /> 21 <pagination /> 22 </template> 23 </carousel> 24 </div> 25 </div>
js
1const app = Vue.createApp({ 2 data() { 3 return { 4 interviews: [ 5 { 6 id: 1, 7 image: "img/img_interview_01.png", 8 title: "00代 / 会社員", 9 content: "テキストテキスト", 10 }, 11//以下3つインタビュー内容 12 ], 13 currentSlide: 0, 14 }; 15 }, 16}); 17 18app.component('carousel', VueCarousel.Carousel); 19app.component('slide', VueCarousel.Slide); 20app.component('navigation', VueCarousel.Navigation); 21app.component('pagination', VueCarousel.Pagination); 22 23app.mount('#slider'); 24
試したこと
dot(丸)を別で作成してみたが、スライドショーと連動しない
補足情報(FW/ツールのバージョンなど)
Vue3、Vue3-carousel共に CDNです
・Vue3
・Vue3-carousel
<link href="https://cdn.jsdelivr.net/npm/vue3-carousel@0.3.1/dist/carousel.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/vue3-carousel@0.3.1/dist/carousel.min.js"></script>開発コードを見た感じではolタグはきちんと生成されていますね。ただ、olである以上はcircleは使えませんが。
あと、その書き方だとどこかでスクリプトエラーを吐いていないでしょうか?

回答1件
あなたの回答
tips
プレビュー