We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9883140 commit 9d797adCopy full SHA for 9d797ad
src/components/home/Banner.vue
@@ -3,9 +3,9 @@
3
<div class="wrap-swiper">
4
<swiper v-if="banner.length > 0" :options="swiperOption" ref="mySwiper" @someSwiperEvent="callback">
5
<swiper-slide v-for="(item, index) in banner" :key="index">
6
- <span @click="toUrl(item.url)">
+ <router-link :to="item.url">
7
<img :src="item.img" alt="">
8
- </span>
+ </router-link>
9
</swiper-slide>
10
<div class="swiper-pagination" slot="pagination"></div>
11
</swiper>
@@ -37,9 +37,6 @@ export default class HomeBanner extends Vue {
37
private callback() {
38
console.log('run');
39
}
40
- private toUrl(url: string) {
41
- this.$router.push(url);
42
- }
43
get banner() {
44
return this.$store.state.homeBanner;
45
0 commit comments