Vue-carousel: Question: Remove dots title

Created on 31 May 2019  路  6Comments  路  Source: SSENSE/vue-carousel

<template>
  <div class="select_style">
    <h3>閬告搰妯$祫妯e紡</h3>
    <Carousel
      :perPage="perPage"
      :navigationEnabled="navigationEnabled"
      :paginationEnabled="false"
    >
      <Slide @slideclick="aaa" title="">
        <img src="/images/ImgLeftStringRight.png" title="妯e紡鍚嶇ū">
      </Slide>
      <Slide>
        <img src="/images/ImgRightStringLeft.png" title="妯e紡鍚嶇ū">
      </Slide>
      <Slide>
        <img src="/images/ImgUpStringDown.png" title="妯e紡鍚嶇ū">
      </Slide>
      <Slide>
        <img src="/images/ImgDownStringUp.png" title="妯e紡鍚嶇ū">
      </Slide>
    </Carousel>
  </div>
</template>

<script>
import { Carousel, Slide } from 'vue-carousel';

export default {
  components: { Carousel, Slide },
  data() {
    return {
      perPage: 3,
      navigationEnabled: true
    };
  },
  methods: {
    aaa() {
      console.log(123);
    }
  }
};
</script>

2019-05-31_152904
How can I remove dots title

need repro question

Most helpful comment

He is asking if there is a way to disable the automatic assignation of title attributes to the pagination dots. So when you mouse over the dots, it won't say "Item 0", "Item 1", etc.

All 6 comments

updated() {
const dots = document.getElementsByClassName('VueCarousel-dot');
for (let index = 0; index < dots.length; index += 1) {
const element = dots[index];
element.title = '';
}
}
it work for me, but I don't know if there is a better way

Hey @x900603, not sure what we're trying to accomplish here - you want to remove the pagination dot? Can you send me a reproduction link to look into this more?

He is asking if there is a way to disable the automatic assignation of title attributes to the pagination dots. So when you mouse over the dots, it won't say "Item 0", "Item 1", etc.

I would also like to be able to set the "title" text on the navigation dots. The text that says _"Item-0"_, _"Item-1"_ etc.
Screenshot 2019-09-04 at 09 39 38

Has anyone found the solution yet? I can remove the title attributes using javascript but I am looking if I could disable it from the Carousel setting as it would be a better way to solve the issue.

@prabshah Nope, still using the "hack" above.

Was this page helpful?
0 / 5 - 0 ratings