Authored by htoo

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -61,7 +61,7 @@ export default {
},
fixed: false,
selectedType: 2, // tab类型高亮
priceDesc: true,
priceDesc: false,
arrowImage: '',
title: '',
scrollY: 0,
... ... @@ -261,7 +261,7 @@ export default {
},
changeArrow() {
this.arrowImage = (this.selectedType === 3 || this.selectedType === 2) ? 'price-arrow' :
this.priceDesc ? 'desc-arrow' : 'asc-arrow';
this.priceDesc ? 'asc-arrow' : 'desc-arrow';
},
goFilter() {
this.yasTab(true);
... ...
<template>
<div class="list-component" v-show="showType">
<div class="list-component" v-show="showType" @click="hideClick">
<div class="list-bg">
<div class="list-item" v-if="list.length" v-for="(item, index) in list" :key="index">
<div class="item" @click="clickItem(item.itemId, item.itemName)">
<div class="item" @click="(e)=> clickItem(e, item.itemId, item.itemName)">
<span :class="selectParams.id.includes(item.itemId) ? 'active-span' : '' ">{{item.itemName}}</span>
<div v-if="selectParams.id.includes(item.itemId)" class="select-class"></div>
</div>
</div>
</div>
<div class="list-bottom">
<div class="bottom-btn clear" @click="clear">重置</div>
<div class="bottom-btn submit" @click="submit">确定</div>
<div class="bottom-btn clear" @click="(e)=>clear(e)">重置</div>
<div class="bottom-btn submit" @click="(e)=>submit(e)">确定</div>
</div>
</div>
</template>
... ... @@ -36,22 +36,29 @@ export default {
hide() {
this.showType = false;
},
hideClick() {
this.$parent.updateFilterParams({});
this.hide();
},
setFilterList(params) {
this.selectParams.id = params.id || [];
this.selectParams.name = params.name || [];
},
submit() {
submit(event) {
event.stopPropagation();
this.$parent.updateFilterParams(this.selectParams);
this.hide();
},
clear() {
clear(event) {
event.stopPropagation();
let params = {
id: [],
name: []
};
this.selectParams = params;
},
clickItem(itemId, itemName) {
clickItem(event, itemId, itemName) {
event.stopPropagation();
let idArray = [].concat(this.selectParams.id);
let nameArray = [].concat(this.selectParams.name);
... ... @@ -72,7 +79,7 @@ export default {
<style lang="scss" scoped>
.list-component {
position: fixed;
position: absolute;
bottom: 0;
left: 0;
top: 186px;
... ...
... ... @@ -24,17 +24,17 @@
<div class="tab-sub-group-item" :class="filterSelectArr.includes('size') && 'selected-sub-tab'" @click="pressFilterType('size')">
<span>{{this.selectedFilterNameParams.size.toString().length ? this.selectedFilterNameParams.size.toString(): '尺码'}}</span>
<div :class="[filterSelectArr.includes('size') ? foldClass : 'black-down-arrow']"></div>
<div :class="[filterSelectArr.includes('size') ? lastFilterFlag === 'size' ? foldClass : 'white-down-arrow' : 'black-down-arrow']"></div>
</div>
<div class="tab-sub-group-item" :class="filterSelectArr.includes('brand') && 'selected-sub-tab'" @click="pressFilterType('brand')">
<span>{{this.selectedFilterNameParams.brand.toString().length ? this.selectedFilterNameParams.brand.toString(): '品牌'}}</span>
<div :class="[filterSelectArr.includes('brand') ? foldClass : 'black-down-arrow']"></div>
<div :class="[filterSelectArr.includes('brand') ? lastFilterFlag === 'brand' ? foldClass : 'white-down-arrow' : 'black-down-arrow']"></div>
</div>
<div class="tab-sub-group-item" :class="filterSelectArr.includes('gender') && 'selected-sub-tab'" @click="pressFilterType('gender')">
<span>{{this.selectedFilterNameParams.gender.toString().length ? this.selectedFilterNameParams.gender.toString(): '性别'}}</span>
<div :class="[filterSelectArr.includes('gender') ? foldClass : 'black-down-arrow']"></div>
<div :class="[filterSelectArr.includes('gender') ? lastFilterFlag === 'gender' ? foldClass : 'white-down-arrow' : 'black-down-arrow']"></div>
</div>
</div>
... ... @@ -357,6 +357,10 @@ export default {
// 更新一下fold状态
this.foldStatus = false;
if (Object.keys(params).length === 0) { // 点击蒙层背景什么都没做,传个{}判断
return;
}
this.seletedFilterParams[this.lastFilterFlag] = params.id;
this.selectedFilterNameParams[this.lastFilterFlag] = params.name;
... ...
{
"name": "xianyu-ufo-app-web",
"version": "1.2.0-beta7",
"version": "1.2.0-beta9",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...