Commit 8595df66105c0a67053b6078ff254da6d9c24c62
1 parent
f0466fb5
展开和收起操作
Showing
3 changed files
with
33 additions
and
15 deletions
src/components/giftGivingItem/giftGivingItem.vue
| @@ -81,9 +81,9 @@ | @@ -81,9 +81,9 @@ | ||
| 81 | </div> | 81 | </div> |
| 82 | </div> | 82 | </div> |
| 83 | <!-- 展开和折叠按钮 --> | 83 | <!-- 展开和折叠按钮 --> |
| 84 | - <div class="fold_box" @click.stop="onLoginMore"> | 84 | + <div class="fold_box" @click.stop="onLoginMore(item)"> |
| 85 | <div class="fold"> | 85 | <div class="fold"> |
| 86 | - 共五件 <div :class="[triangle?'triangle_top':'triangle_bottom']"> </div> | 86 | + 共五件 <div :class="[item.triangle?'triangle_top':'triangle_bottom']"> </div> |
| 87 | </div> | 87 | </div> |
| 88 | </div> | 88 | </div> |
| 89 | <!-- 显示文字 --> | 89 | <!-- 显示文字 --> |
| @@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
| 146 | export default { | 146 | export default { |
| 147 | name: "giftGivingItem", | 147 | name: "giftGivingItem", |
| 148 | data() { | 148 | data() { |
| 149 | - return {triangle:false}; | 149 | + return {}; |
| 150 | }, | 150 | }, |
| 151 | props: ["giftGivingItem", "isData"], | 151 | props: ["giftGivingItem", "isData"], |
| 152 | created() {}, | 152 | created() {}, |
| @@ -176,9 +176,8 @@ export default { | @@ -176,9 +176,8 @@ export default { | ||
| 176 | this.$emit("OrderLink"); | 176 | this.$emit("OrderLink"); |
| 177 | }, | 177 | }, |
| 178 | // 展开加载更多 | 178 | // 展开加载更多 |
| 179 | - onLoginMore(){ | ||
| 180 | - this.triangle = !this.triangle; | ||
| 181 | - | 179 | + onLoginMore(item){ |
| 180 | + this.$set(item,'triangle', !item.triangle) | ||
| 182 | } | 181 | } |
| 183 | } | 182 | } |
| 184 | }; | 183 | }; |
src/components/receivingGiftsItem/receivingGiftsItem.vue
| @@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
| 90 | </div> | 90 | </div> |
| 91 | </div> | 91 | </div> |
| 92 | </div> | 92 | </div> |
| 93 | - <div v-show="triangle" class="item_info"> | 93 | + <div v-show="item.triangle" class="item_info"> |
| 94 | <img | 94 | <img |
| 95 | v-if="item && item.goods && item.goods.simg" | 95 | v-if="item && item.goods && item.goods.simg" |
| 96 | v-lazy="item.goods.simg" | 96 | v-lazy="item.goods.simg" |
| @@ -129,12 +129,12 @@ | @@ -129,12 +129,12 @@ | ||
| 129 | </div> | 129 | </div> |
| 130 | </div> | 130 | </div> |
| 131 | <!-- 展开和折叠按钮 --> | 131 | <!-- 展开和折叠按钮 --> |
| 132 | - <div class="fold_box" @click.stop="onLoginMore"> | 132 | + <div class="fold_box" @click.stop="onLoginMore(item)"> |
| 133 | <div class="fold"> | 133 | <div class="fold"> |
| 134 | 共五件 | 134 | 共五件 |
| 135 | <div | 135 | <div |
| 136 | :class="[ | 136 | :class="[ |
| 137 | - triangle ? 'triangle_top' : 'triangle_bottom' | 137 | + item.triangle ? 'triangle_top' : 'triangle_bottom' |
| 138 | ]" | 138 | ]" |
| 139 | ></div> | 139 | ></div> |
| 140 | </div> | 140 | </div> |
| @@ -159,9 +159,7 @@ | @@ -159,9 +159,7 @@ | ||
| 159 | export default { | 159 | export default { |
| 160 | name: "receivingGiftsInfo", | 160 | name: "receivingGiftsInfo", |
| 161 | data() { | 161 | data() { |
| 162 | - return { | ||
| 163 | - triangle: false // 三角型号false向下true向上 | ||
| 164 | - }; | 162 | + return {}; |
| 165 | }, | 163 | }, |
| 166 | props: ["receivingGiftsInfo", "isData"], | 164 | props: ["receivingGiftsInfo", "isData"], |
| 167 | created() {}, | 165 | created() {}, |
| @@ -187,8 +185,8 @@ export default { | @@ -187,8 +185,8 @@ export default { | ||
| 187 | this.$emit("OrderLink"); | 185 | this.$emit("OrderLink"); |
| 188 | }, | 186 | }, |
| 189 | // 展开加载更多 | 187 | // 展开加载更多 |
| 190 | - onLoginMore() { | ||
| 191 | - this.triangle = !this.triangle; | 188 | + onLoginMore(item) { |
| 189 | + this.$set(item,"triangle", !item.triangle) | ||
| 192 | } | 190 | } |
| 193 | } | 191 | } |
| 194 | }; | 192 | }; |
src/pages/myGiftBox/myGiftBox.vue
| @@ -36,7 +36,8 @@ | @@ -36,7 +36,8 @@ | ||
| 36 | </div> | 36 | </div> |
| 37 | <!-- 筛选 --> | 37 | <!-- 筛选 --> |
| 38 | <div | 38 | <div |
| 39 | - @click="popupShow = true" | 39 | + @close="closePopup" |
| 40 | + @click="onScreen" | ||
| 40 | class="screen_box" | 41 | class="screen_box" |
| 41 | > | 42 | > |
| 42 | <div>筛选</div> | 43 | <div>筛选</div> |
| @@ -336,6 +337,26 @@ export default { | @@ -336,6 +337,26 @@ export default { | ||
| 336 | } | 337 | } |
| 337 | }, | 338 | }, |
| 338 | /** | 339 | /** |
| 340 | + * 筛选 | ||
| 341 | + */ | ||
| 342 | + onScreen(){ | ||
| 343 | + // 显示右侧抽屉 | ||
| 344 | + this.popupShow = true | ||
| 345 | + if(this.active == 1){ | ||
| 346 | + // 调用im是否显示隐藏1显示im聊天弹窗0不显示 | ||
| 347 | + this.setGiftBottomVisibleBySwitchTab(0); | ||
| 348 | + } | ||
| 349 | + }, | ||
| 350 | + /** | ||
| 351 | + * 关闭筛选抽屉 | ||
| 352 | + */ | ||
| 353 | + closePopup(){ | ||
| 354 | + if(this.active == 1){ | ||
| 355 | + // 调用im是否显示隐藏1显示im聊天弹窗0不显示 | ||
| 356 | + this.setGiftBottomVisibleBySwitchTab(1); | ||
| 357 | + } | ||
| 358 | + }, | ||
| 359 | + /** | ||
| 339 | * 选中按钮事件 | 360 | * 选中按钮事件 |
| 340 | */ | 361 | */ |
| 341 | changBtn(item) { | 362 | changBtn(item) { |