Commit 8595df66105c0a67053b6078ff254da6d9c24c62

Authored by zhiyangdu
1 parent f0466fb5

展开和收起操作

src/components/giftGivingItem/giftGivingItem.vue
... ... @@ -81,9 +81,9 @@
81 81 </div>
82 82 </div>
83 83 <!-- 展开和折叠按钮 -->
84   - <div class="fold_box" @click.stop="onLoginMore">
  84 + <div class="fold_box" @click.stop="onLoginMore(item)">
85 85 <div class="fold">
86   - 共五件 <div :class="[triangle?'triangle_top':'triangle_bottom']"> </div>
  86 + 共五件 <div :class="[item.triangle?'triangle_top':'triangle_bottom']"> </div>
87 87 </div>
88 88 </div>
89 89 <!-- 显示文字 -->
... ... @@ -146,7 +146,7 @@
146 146 export default {
147 147 name: "giftGivingItem",
148 148 data() {
149   - return {triangle:false};
  149 + return {};
150 150 },
151 151 props: ["giftGivingItem", "isData"],
152 152 created() {},
... ... @@ -176,9 +176,8 @@ export default {
176 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 90 </div>
91 91 </div>
92 92 </div>
93   - <div v-show="triangle" class="item_info">
  93 + <div v-show="item.triangle" class="item_info">
94 94 <img
95 95 v-if="item && item.goods && item.goods.simg"
96 96 v-lazy="item.goods.simg"
... ... @@ -129,12 +129,12 @@
129 129 </div>
130 130 </div>
131 131 <!-- 展开和折叠按钮 -->
132   - <div class="fold_box" @click.stop="onLoginMore">
  132 + <div class="fold_box" @click.stop="onLoginMore(item)">
133 133 <div class="fold">
134 134 共五件
135 135 <div
136 136 :class="[
137   - triangle ? 'triangle_top' : 'triangle_bottom'
  137 + item.triangle ? 'triangle_top' : 'triangle_bottom'
138 138 ]"
139 139 ></div>
140 140 </div>
... ... @@ -159,9 +159,7 @@
159 159 export default {
160 160 name: "receivingGiftsInfo",
161 161 data() {
162   - return {
163   - triangle: false // 三角型号false向下true向上
164   - };
  162 + return {};
165 163 },
166 164 props: ["receivingGiftsInfo", "isData"],
167 165 created() {},
... ... @@ -187,8 +185,8 @@ export default {
187 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 36 </div>
37 37 <!-- 筛选 -->
38 38 <div
39   - @click="popupShow = true"
  39 + @close="closePopup"
  40 + @click="onScreen"
40 41 class="screen_box"
41 42 >
42 43 <div>筛选</div>
... ... @@ -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 362 changBtn(item) {
... ...