when using ivew"s rotation graph, some div, is added to the rotation diagram and the @ click event is bound, but a strange problem is found. Every time banner rotation is played, the bound click cannot be clicked, and only when the next banner is displayed can it be clicked
.so I thought that getting this element through ref and dynamically adding a @ click event to it might solve my problem
so I want to ask how I should bind this element to the @ click event
now that I have obtained this element through ref.=
this is a problem with the iview carousel graph component.
in < CarouselItem >
, I wrote some div, to follow < CarouselItem >
while carousel, in which there is a div bound with a @ click event,
but this button, every time the carousel reaches the current time, it cannot be clicked
for example, the first round can be clicked, and
the next round can be clicked, but it cannot be clicked.
has been clickable-not clickable-clickable-clickable
`
< Carousel @ on-change= "bannerIndex" class= "banner-box" loop dots= "inside": autoplay= "! clickLQ": autoplay-speed= "4000" arrow= "hover": height= "600" >
<CarouselItem>
<div class="bannerimg-box" :style="{backgroundImage:"url(/static/images/banner_01.png)"}"></div>
<div class="slogan-center" :class="{"en_slogan":$store.state.lang == "en" ? true:false}">
<div class="text-slogan-name">{{$t("home.sloganName")}}</div>
<div class="text-slogan-content">{{$t("home.sloganContent1")}}</div>
<div class="text-slogan-content">{{$t("home.sloganContent2")}}</div>
<img class="ball" src="/static/images/banner_ball2.png" alt="">
<div class="coming-soon">{{$t("home.coming_soon")}}</div>
</div>
</CarouselItem>
<CarouselItem>
<div class="bannerimg-box" :style="{backgroundImage:"url(/static/images/banner_02.jpg)"}"></div>
<div class="banner2">
<div class="banner2_title">{{$t("home.banner2_title")}}</div>
<div class="banner2_1_text">{{$t("home.banner2_1_text")}}</div>
<div class="banner2_2_text">{{$t("home.banner2_2_text")}}</div>
<div class="btn_login_register">
<div v-if="!$store.state.login">
<a :href="$store.state.trans_url+"/login"" class="btn_login" >{{$t("home.btn_login")}}</a>
<a :href="$store.state.trans_url+"/register"" class="btn_register" >{{$t("home.btn_register")}}</a>
</div>
<div v-if="$store.state.login">
<a :href="$store.state.trans_url+"/account/invite"" class="btn_yq" >{{$t("home.btn_yq")}}</a>
</div>
<div class="tips_text">
{{$t("home.tips_text1")}} <span ref="bindClickYq" @click="lingquBtn(!$store.state.login ? true : $store.state.myInfo.airDropStatus ? true:false)">{{$t("home.tips_text2")}}</span>
</div>
</div>
</div>
</CarouselItem>
</Carousel>
`