Authored by htoo

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

@@ -61,7 +61,7 @@ export default { @@ -61,7 +61,7 @@ export default {
61 }, 61 },
62 fixed: false, 62 fixed: false,
63 selectedType: 2, // tab类型高亮 63 selectedType: 2, // tab类型高亮
64 - priceDesc: true, 64 + priceDesc: false,
65 arrowImage: '', 65 arrowImage: '',
66 title: '', 66 title: '',
67 scrollY: 0, 67 scrollY: 0,
@@ -261,7 +261,7 @@ export default { @@ -261,7 +261,7 @@ export default {
261 }, 261 },
262 changeArrow() { 262 changeArrow() {
263 this.arrowImage = (this.selectedType === 3 || this.selectedType === 2) ? 'price-arrow' : 263 this.arrowImage = (this.selectedType === 3 || this.selectedType === 2) ? 'price-arrow' :
264 - this.priceDesc ? 'desc-arrow' : 'asc-arrow'; 264 + this.priceDesc ? 'asc-arrow' : 'desc-arrow';
265 }, 265 },
266 goFilter() { 266 goFilter() {
267 this.yasTab(true); 267 this.yasTab(true);
1 <template> 1 <template>
2 - <div class="list-component" v-show="showType"> 2 + <div class="list-component" v-show="showType" @click="hideClick">
3 <div class="list-bg"> 3 <div class="list-bg">
4 <div class="list-item" v-if="list.length" v-for="(item, index) in list" :key="index"> 4 <div class="list-item" v-if="list.length" v-for="(item, index) in list" :key="index">
5 - <div class="item" @click="clickItem(item.itemId, item.itemName)"> 5 + <div class="item" @click="(e)=> clickItem(e, item.itemId, item.itemName)">
6 <span :class="selectParams.id.includes(item.itemId) ? 'active-span' : '' ">{{item.itemName}}</span> 6 <span :class="selectParams.id.includes(item.itemId) ? 'active-span' : '' ">{{item.itemName}}</span>
7 <div v-if="selectParams.id.includes(item.itemId)" class="select-class"></div> 7 <div v-if="selectParams.id.includes(item.itemId)" class="select-class"></div>
8 </div> 8 </div>
9 </div> 9 </div>
10 </div> 10 </div>
11 <div class="list-bottom"> 11 <div class="list-bottom">
12 - <div class="bottom-btn clear" @click="clear">重置</div>  
13 - <div class="bottom-btn submit" @click="submit">确定</div> 12 + <div class="bottom-btn clear" @click="(e)=>clear(e)">重置</div>
  13 + <div class="bottom-btn submit" @click="(e)=>submit(e)">确定</div>
14 </div> 14 </div>
15 </div> 15 </div>
16 </template> 16 </template>
@@ -36,22 +36,29 @@ export default { @@ -36,22 +36,29 @@ export default {
36 hide() { 36 hide() {
37 this.showType = false; 37 this.showType = false;
38 }, 38 },
  39 + hideClick() {
  40 + this.$parent.updateFilterParams({});
  41 + this.hide();
  42 + },
39 setFilterList(params) { 43 setFilterList(params) {
40 this.selectParams.id = params.id || []; 44 this.selectParams.id = params.id || [];
41 this.selectParams.name = params.name || []; 45 this.selectParams.name = params.name || [];
42 }, 46 },
43 - submit() { 47 + submit(event) {
  48 + event.stopPropagation();
44 this.$parent.updateFilterParams(this.selectParams); 49 this.$parent.updateFilterParams(this.selectParams);
45 this.hide(); 50 this.hide();
46 }, 51 },
47 - clear() { 52 + clear(event) {
  53 + event.stopPropagation();
48 let params = { 54 let params = {
49 id: [], 55 id: [],
50 name: [] 56 name: []
51 }; 57 };
52 this.selectParams = params; 58 this.selectParams = params;
53 }, 59 },
54 - clickItem(itemId, itemName) { 60 + clickItem(event, itemId, itemName) {
  61 + event.stopPropagation();
55 let idArray = [].concat(this.selectParams.id); 62 let idArray = [].concat(this.selectParams.id);
56 let nameArray = [].concat(this.selectParams.name); 63 let nameArray = [].concat(this.selectParams.name);
57 64
@@ -72,7 +79,7 @@ export default { @@ -72,7 +79,7 @@ export default {
72 79
73 <style lang="scss" scoped> 80 <style lang="scss" scoped>
74 .list-component { 81 .list-component {
75 - position: fixed; 82 + position: absolute;
76 bottom: 0; 83 bottom: 0;
77 left: 0; 84 left: 0;
78 top: 186px; 85 top: 186px;
@@ -24,17 +24,17 @@ @@ -24,17 +24,17 @@
24 24
25 <div class="tab-sub-group-item" :class="filterSelectArr.includes('size') && 'selected-sub-tab'" @click="pressFilterType('size')"> 25 <div class="tab-sub-group-item" :class="filterSelectArr.includes('size') && 'selected-sub-tab'" @click="pressFilterType('size')">
26 <span>{{this.selectedFilterNameParams.size.toString().length ? this.selectedFilterNameParams.size.toString(): '尺码'}}</span> 26 <span>{{this.selectedFilterNameParams.size.toString().length ? this.selectedFilterNameParams.size.toString(): '尺码'}}</span>
27 - <div :class="[filterSelectArr.includes('size') ? foldClass : 'black-down-arrow']"></div> 27 + <div :class="[filterSelectArr.includes('size') ? lastFilterFlag === 'size' ? foldClass : 'white-down-arrow' : 'black-down-arrow']"></div>
28 </div> 28 </div>
29 29
30 <div class="tab-sub-group-item" :class="filterSelectArr.includes('brand') && 'selected-sub-tab'" @click="pressFilterType('brand')"> 30 <div class="tab-sub-group-item" :class="filterSelectArr.includes('brand') && 'selected-sub-tab'" @click="pressFilterType('brand')">
31 <span>{{this.selectedFilterNameParams.brand.toString().length ? this.selectedFilterNameParams.brand.toString(): '品牌'}}</span> 31 <span>{{this.selectedFilterNameParams.brand.toString().length ? this.selectedFilterNameParams.brand.toString(): '品牌'}}</span>
32 - <div :class="[filterSelectArr.includes('brand') ? foldClass : 'black-down-arrow']"></div> 32 + <div :class="[filterSelectArr.includes('brand') ? lastFilterFlag === 'brand' ? foldClass : 'white-down-arrow' : 'black-down-arrow']"></div>
33 </div> 33 </div>
34 34
35 <div class="tab-sub-group-item" :class="filterSelectArr.includes('gender') && 'selected-sub-tab'" @click="pressFilterType('gender')"> 35 <div class="tab-sub-group-item" :class="filterSelectArr.includes('gender') && 'selected-sub-tab'" @click="pressFilterType('gender')">
36 <span>{{this.selectedFilterNameParams.gender.toString().length ? this.selectedFilterNameParams.gender.toString(): '性别'}}</span> 36 <span>{{this.selectedFilterNameParams.gender.toString().length ? this.selectedFilterNameParams.gender.toString(): '性别'}}</span>
37 - <div :class="[filterSelectArr.includes('gender') ? foldClass : 'black-down-arrow']"></div> 37 + <div :class="[filterSelectArr.includes('gender') ? lastFilterFlag === 'gender' ? foldClass : 'white-down-arrow' : 'black-down-arrow']"></div>
38 </div> 38 </div>
39 39
40 </div> 40 </div>
@@ -357,6 +357,10 @@ export default { @@ -357,6 +357,10 @@ export default {
357 // 更新一下fold状态 357 // 更新一下fold状态
358 this.foldStatus = false; 358 this.foldStatus = false;
359 359
  360 + if (Object.keys(params).length === 0) { // 点击蒙层背景什么都没做,传个{}判断
  361 + return;
  362 + }
  363 +
360 this.seletedFilterParams[this.lastFilterFlag] = params.id; 364 this.seletedFilterParams[this.lastFilterFlag] = params.id;
361 this.selectedFilterNameParams[this.lastFilterFlag] = params.name; 365 this.selectedFilterNameParams[this.lastFilterFlag] = params.name;
362 366
1 { 1 {
2 "name": "xianyu-ufo-app-web", 2 "name": "xianyu-ufo-app-web",
3 - "version": "1.2.0-beta7", 3 + "version": "1.2.0-beta9",
4 "private": true, 4 "private": true,
5 "description": "Xianyu Project With Express", 5 "description": "Xianyu Project With Express",
6 "repository": { 6 "repository": {