From ca9dd3db6ff1df627e2ab43b148be5c1eed0fb2e Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Mon, 22 Apr 2024 11:52:49 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E5=B7=A5=E4=BD=9C?=
 =?UTF-8?q?=E5=8F=B0=E6=93=8D=E4=BD=9C=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pages/gather/gather.vue | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue
index f4ea2a0..073ca26 100644
--- a/pages/gather/gather.vue
+++ b/pages/gather/gather.vue
@@ -130,7 +130,7 @@
   }
 </style>
 <template>
-  <view class="gather">
+  <view class="gather" @click.stop="clickWhite">
     <!--顶部定位-->
     <view class="gather-header">
       <view style="height: var(--status-bar-height);"></view>
@@ -182,18 +182,18 @@
       <view class="content">
         <block v-if="nowMenuList.length > 0">
           <u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
-            <view class="examine" @click="editFlag ? removeMenu(item) : clickMenu(item)">
+            <view class="examine" @click.stop="editFlag ? removeMenu(item) : clickMenu(item)"  @longpress="editFlag = true">
               <image class="icon_img" :src="item.pic" mode="aspectFit">
               </image>
               <!-- <u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon> -->
-              <view v-if="editFlag" class="icon" style="background-color: red;">隐藏</view>
+              <view v-if="editFlag" class="icon" style="background-color: red;">删除</view>
               <text class="text">{{ item.name }}</text>
             </view>
           </u-transition>
         </block>
         <view class="add-box examine"
           style="display: flex;justify-content: center;flex-direction: column;align-items: center;"
-          @click="editFlag = true">
+          @click.stop="editFlag = true" @longpress="editFlag = true" v-if="!editFlag">
           <view class="add-box-icon"
             style="margin-bottom: 14rpx; width:84rpx;height:84rpx;border: 2rpx solid #40AE36;border-radius: 10rpx;display: flex;justify-content: center;align-items: center;">
             <u-icon name="plus" size="25" :bold="true" color="#40AE36"></u-icon>
@@ -209,7 +209,7 @@
       </view>
       <view class="content">
         <u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
-          <view class="examine" @click="pushMenu(item)">
+          <view class="examine" @click.stop="pushMenu(item)">
             <image class="icon_img" :src="item.pic" mode="aspectFit"> </image>
             <!-- <u-icon class="icon" name="plus-circle-fill"></u-icon> -->
             <view class="icon">添加</view>
@@ -524,6 +524,10 @@
           }
         });
       },
+      // 点击空白区域完成添加
+      clickWhite(){
+        if(this.editFlag) this.editFlag = false;
+      }
     }
   };
 </script>