jufubao-mall 2.0.89-beta2 → 2.0.89-beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</view>
|
|
117
117
|
</view>
|
|
118
118
|
<view v-if="filterCondition === 'brand' && showRightMenu === 'Y'" class="brand-filter-bar">
|
|
119
|
-
<scroll-view scroll-x class="brand-scroll">
|
|
119
|
+
<scroll-view scroll-x class="brand-scroll" :style="brandScrollStyle">
|
|
120
120
|
<view class="brand-tag-wrap">
|
|
121
121
|
<view
|
|
122
122
|
v-for="(brand, idx) in brandList"
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
</view>
|
|
130
130
|
</view>
|
|
131
131
|
</scroll-view>
|
|
132
|
-
<view class="brand-dropdown-btn" @click="showBrandAll = !showBrandAll">
|
|
132
|
+
<view v-show="showBrandDropdownBtn" class="brand-dropdown-btn" @click="showBrandAll = !showBrandAll">
|
|
133
133
|
<xd-font-icon icon="iconxia_down" color="#999" size="24"></xd-font-icon>
|
|
134
134
|
</view>
|
|
135
135
|
</view>
|
|
@@ -314,6 +314,7 @@
|
|
|
314
314
|
brandList: [],
|
|
315
315
|
selectedBrandIds: [],
|
|
316
316
|
showBrandAll: false,
|
|
317
|
+
showBrandDropdownBtn: false,
|
|
317
318
|
}
|
|
318
319
|
},
|
|
319
320
|
computed: {
|
|
@@ -429,6 +430,12 @@
|
|
|
429
430
|
if (this.sortMenu.length > 1) top += 80;
|
|
430
431
|
return top;
|
|
431
432
|
},
|
|
433
|
+
|
|
434
|
+
brandScrollStyle() {
|
|
435
|
+
return {
|
|
436
|
+
'padding-right': this.showBrandDropdownBtn ? '60rpx' : '0'
|
|
437
|
+
};
|
|
438
|
+
},
|
|
432
439
|
},
|
|
433
440
|
watch: {
|
|
434
441
|
container(value, oldValue) {
|
|
@@ -788,6 +795,7 @@
|
|
|
788
795
|
icon: item.icon ? getServiceUrl(item.icon, 'size3') : ''
|
|
789
796
|
}));
|
|
790
797
|
}
|
|
798
|
+
this.checkBrandOverflow();
|
|
791
799
|
}).catch(err => {
|
|
792
800
|
this.$xdLog.catch(err);
|
|
793
801
|
});
|
|
@@ -807,6 +815,24 @@
|
|
|
807
815
|
this.getProductList();
|
|
808
816
|
},
|
|
809
817
|
|
|
818
|
+
// 检测品牌标签是否溢出容器,控制下拉按钮显示
|
|
819
|
+
checkBrandOverflow() {
|
|
820
|
+
this.$nextTick(() => {
|
|
821
|
+
const query = uni.createSelectorQuery().in(this);
|
|
822
|
+
query.select('.brand-scroll').boundingClientRect();
|
|
823
|
+
query.select('.brand-tag-wrap').boundingClientRect();
|
|
824
|
+
query.exec(res => {
|
|
825
|
+
if (res && res.length === 2) {
|
|
826
|
+
const scrollRect = res[0];
|
|
827
|
+
const wrapRect = res[1];
|
|
828
|
+
if (scrollRect && wrapRect) {
|
|
829
|
+
this.showBrandDropdownBtn = wrapRect.width > scrollRect.width;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
});
|
|
834
|
+
},
|
|
835
|
+
|
|
810
836
|
// 计算商品列表区域高度
|
|
811
837
|
getProductWrapHeight() {
|
|
812
838
|
if (this.showRightMenu !== 'Y') return '100%';
|
|
@@ -1192,7 +1218,6 @@
|
|
|
1192
1218
|
height: 100%;
|
|
1193
1219
|
white-space: nowrap;
|
|
1194
1220
|
box-sizing: border-box;
|
|
1195
|
-
padding-right: 60rpx;
|
|
1196
1221
|
}
|
|
1197
1222
|
|
|
1198
1223
|
.brand-tag-wrap {
|