|
|
@@ -152,7 +152,7 @@ export default {
|
|
|
});
|
|
|
this.productInfo = data;
|
|
|
this.classIndex = 0;
|
|
|
- this.scroll_into_view = 'class_'+0;
|
|
|
+ this.scroll_into_view = 'class_0';
|
|
|
this.scrollPushList();
|
|
|
// console.log(this.filterProductInfo)
|
|
|
} catch (error) {
|
|
|
@@ -528,6 +528,9 @@ export default {
|
|
|
if(cur!=0&&cur!=this.filterProductInfo.length-1){
|
|
|
this.filterProductInfo[cur-1].isActive = true;
|
|
|
this.filterProductInfo[cur+1].isActive = true;
|
|
|
+ if(this.filterProductInfo[cur+1].child.length<5&&cur<this.filterProductInfo.length-3){
|
|
|
+ this.filterProductInfo[cur+2].isActive = true;
|
|
|
+ }
|
|
|
}
|
|
|
// clearInterval(this.timeFun)
|
|
|
this.scroll_into_view = '';
|
|
|
@@ -579,12 +582,18 @@ export default {
|
|
|
this.classIndex = i;
|
|
|
this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
this.filterProductInfo[this.classIndex+1].isActive = true;
|
|
|
+ if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
|
+ this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
+ }
|
|
|
// this.scrollPushList();
|
|
|
break;
|
|
|
}else if(node2 && top_page === node2){
|
|
|
this.classIndex = i + 1;
|
|
|
this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
this.filterProductInfo[this.classIndex+1].isActive = true;
|
|
|
+ if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
|
+ this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
+ }
|
|
|
// this.scrollPushList();
|
|
|
break;
|
|
|
}
|
|
|
@@ -594,6 +603,9 @@ export default {
|
|
|
scroll_bottom(){
|
|
|
this.classIndex = this.filterProductInfo.length-1
|
|
|
this.filterProductInfo[this.classIndex].isActive = true;
|
|
|
+ if(this.filterProductInfo[this.classIndex+1].child.length<5){
|
|
|
+ this.filterProductInfo[this.classIndex+2].isActive = true;
|
|
|
+ }
|
|
|
// this.scrollPushList();
|
|
|
},
|
|
|
/**
|