提交 45b5f02b authored 作者: matian's avatar matian

轮播添加提示

上级 9b7ddf33
......@@ -442,12 +442,20 @@ export default {
this.isShowSwiper = false
},
// 轮播下一张图
handleNext() {
this.swiper.slideNext()
handleNext(indexItem) {
if (indexItem < this.campusList.length - 1) {
this.swiper.slideNext()
} else {
this.$message('这已经是最后一张图片')
}
},
// 轮播上一张图
handlePrev() {
this.swiper.slidePrev()
handlePrev(indexItem) {
if (indexItem <= 0) {
this.$message('这已经是第一张图片')
} else {
this.swiper.slidePrev()
}
}
},
computed: {
......
......@@ -44,6 +44,7 @@ export default {
&.active {
background: #aa1941;
border-radius: 8px 8px 8px 8px;
color: #ffffff;
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论