|
|
@@ -146,11 +146,11 @@ export default {
|
|
|
let currentItem = item;
|
|
|
let preCurrentItem = {};
|
|
|
let nextCurrentItem = {};
|
|
|
- if(currentItem.sort === 1) {
|
|
|
+ if(index === 0) {
|
|
|
preCurrentItem = this.dataList[this.dataList.length-1];
|
|
|
nextCurrentItem = this.dataList.filter(e=>e.sort === this.dataList[index+1].sort)[0];
|
|
|
}
|
|
|
- else if(index===4) {
|
|
|
+ else if(index === len-1) {
|
|
|
preCurrentItem = this.dataList.filter(e=>e.sort === this.dataList[index-1].sort)[0];
|
|
|
nextCurrentItem = this.dataList[0];
|
|
|
} else {
|