Browse Source

分类品牌筛选

zhengjinyi 3 năm trước cách đây
mục cha
commit
f9033f2658

+ 1 - 0
src/main/resources/static/css/product/list.css

@@ -9,6 +9,7 @@ li{list-style:none}
     .product-brand .product-brand-name.show{line-height: 88px;}
     .product-brand-more{width: 50px;height: 32px;line-height: 32px;font-size: 14px;margin: 0 auto;color: #909090;text-align: left;transition: all 0.2s;cursor: pointer;box-sizing: border-box;position: absolute;right: 24px;top: 24px;}
     .product-brand-more .icon:before{background-position: -93px 7px;width: 20px;height: 32px;right: 0;position: absolute;}
+    .product-brand-more.show .icon:before{background-position: -123px 7px;width: 20px;height: 32px;right: 0;position: absolute;}
     .product-brand-list{width: 970px;float: left;box-sizing: border-box;padding:0 24px;height: 44px;overflow: scroll;overflow-x: hidden;overflow-y:auto;}
     .product-brand-list.show{height: 88px;}
     .product-brand-list .brand-list{width: 90px;height: 32px;padding: 0 12px;border: 1px solid #E2E7EF;float: left;box-sizing: border-box;line-height: 32px;font-size: 16px;color: #4A4F58;border-radius: 2px;margin-right: 24px;margin-bottom: 12px;}

+ 5 - 1
src/main/resources/static/js/product/list.js

@@ -182,7 +182,11 @@ var productList = new Vue({
         },
         showMoreItem:function(){// 点击更多品牌
             this.isShowAllBrands = !this.isShowAllBrands;
-            this.brandLists = this.defaultBrandLists;
+            if( this.isShowAllBrands){
+                this.brandLists = this.defaultBrandLists;
+            }else{
+                this.brandLists = this.defaultBrandLists.slice(0,8)
+            }
         },
         hanldCheckedActivi:function(){// 选择促销商品选项
             this.isActiviChecked = !this.isActiviChecked;

+ 5 - 1
src/main/resources/static/js/product/produce-list.js

@@ -159,7 +159,11 @@ var productList = new Vue({
         },
         showMoreItem:function(){// 点击更多品牌
             this.isShowAllBrands = !this.isShowAllBrands;
-            this.brandLists = this.defaultBrandLists;
+            if( this.isShowAllBrands){
+                this.brandLists = this.defaultBrandLists;
+            }else{
+                this.brandLists = this.defaultBrandLists.slice(0,8)
+            }
         },
         hanldCheckedActivi:function(){// 选择促销商品选项
             this.isActiviChecked = !this.isActiviChecked;