Commit 4cc85d81 by 李伟康

commit 修改轮播样式

1 parent 8519adf9
......@@ -433,12 +433,16 @@ export default {
this.bannerTabId = `car-banner-${e.detail.current}`
},
carClass (index) {
let className = this.currentIndex == index ? 'current-item' : ''
if (this.currentIndex == 1) {
if (index == 0) className += ' current-item-left'
console.log()
let { carBannerList, currentIndex } = this,
len = carBannerList.length
let className = currentIndex == index ? 'current-item' : ''
if (currentIndex == 0 && index == len - 1) className += ' current-item-left'
else if (currentIndex == len - 1 && index != 0) className += ' current-item-left'
else {
if (index < currentIndex) className += ' current-item-left'
else className += ' current-item-right'
}
if ((this.currentIndex == 2 && index == 1) || (this.currentIndex == 0 && index == 2)) className += ' current-item-left'
return className
},
changeIndex (index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!