问题描述
有没有办法检测何时点击了 v-carousel 上的分隔符?
解决方法
这样的东西应该可以工作
<button @click="handleClick">...</button>
编辑
假设您使用的是 vuetify 的 carousel 组件,您也可以使用 their events。
<template>
<v-carousel v-model="model" @change="handleChange">
<v-carousel-item
v-for="(color,i) in colors"
:key="color"
>
<v-sheet
:color="color"
height="100%"
tile
>
<v-row
class="fill-height"
align="center"
justify="center"
>
<div class="display-3">
Slide {{ i + 1 }}
</div>
</v-row>
</v-sheet>
</v-carousel-item>
</v-carousel>
</template>