From e146dc63e63bafb4f755d59421d8f3279caea173 Mon Sep 17 00:00:00 2001
From: liyuan <121358544@qq.com>
Date: 星期二, 16 三月 2021 14:17:18 +0800
Subject: [PATCH] 第一次

---
 src/components/panel/ToolBoxPanel.vue |   58 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue
index a6dd8d1..feeb4ae 100644
--- a/src/components/panel/ToolBoxPanel.vue
+++ b/src/components/panel/ToolBoxPanel.vue
@@ -5,27 +5,29 @@
         <img src="@assets/images/map-pages/icon/toolbox/tool.png" alt="">
         <span>宸ュ叿</span>
       </el-button>
-      <el-row v-show="selectGroup" class="specific-tools-group">
-        <el-popover
-            placement="bottom"
-            width=""
-            trigger="click"
-            :popper-class="'tools-panel-content'"
-            v-for="(item,index) in menuList" :key="index"
-        >
-          <el-button slot="reference" class="el-button" :class="active === index ? 'tools-panel-choose':''"
-                     @click="changeChoose(index)">
-            <img :src="item.icon" alt=""/>
-            <span>{{ item.label }}</span>
+      <transition name="isD">
+        <el-row v-show="selectGroup" class="specific-tools-group">
+          <el-popover
+              placement="bottom"
+              width=""
+              trigger="click"
+              :popper-class="'tools-panel-content'"
+              v-for="(item,index) in menuList" :key="index"
+          >
+            <el-button slot="reference" class="el-button" :class="active === index ? 'tools-panel-choose':''"
+                      @click="changeChoose(index)">
+              <img :src="item.icon" alt=""/>
+              <span>{{ item.label }}</span>
+            </el-button>
+            <el-button v-for="(itemT,indexT) in item.items" :key="indexT" @click="choiceItem(itemT)">
+              <img :src="itemT.icon" :title="itemT.title"/>
+            </el-button>
+          </el-popover>
+          <el-button @click="changeSelect" class="special-button">
+            <i :class="selectGroup === false ? 'el-icon-d-arrow-right':'el-icon-d-arrow-left'"></i>
           </el-button>
-          <el-button v-for="(itemT,indexT) in item.items" :key="indexT" @click="choiceItem(itemT)">
-            <img :src="itemT.icon" :title="itemT.title"/>
-          </el-button>
-        </el-popover>
-        <el-button @click="changeSelect" class="special-button">
-          <i :class="selectGroup === false ? 'el-icon-d-arrow-right':'el-icon-d-arrow-left'"></i>
-        </el-button>
-      </el-row>
+        </el-row>
+      </transition>
     </div>
   </div>
 </template>
@@ -179,7 +181,8 @@
       drawLayer: null,
       map: null,
       L: window.L,
-      active: 0
+      active: 0,
+      isShow: true
     }
   },
   methods: {
@@ -314,6 +317,7 @@
     // 宸︿笂鍔熻兘鎺у埗
     changeSelect () {
       this.selectGroup = !this.selectGroup
+      this.isShow = !this.isShow
     }
   }
 }
@@ -328,10 +332,8 @@
 
   .specific-tools {
     display: flex;
-    align-items: center;
-    justify-content: space-evenly;
-
     .el-button {
+      z-index: 999;
       padding: 0;
       margin: 0 0.015rem;
       width: 45px;
@@ -352,6 +354,7 @@
     }
 
     .specific-tools-group {
+      z-index: 1;
       .tools-panel-choose {
         border: none;
         box-shadow: 0 0 0.03rem @color-shadow;
@@ -374,4 +377,11 @@
     }
   }
 }
+.isD-enter-active, .isD-leave-active{
+  transition: all 0.5s;
+}
+.isD-enter, .isD-leave-to{
+  opacity: 0;
+  transform: translateX(-100px);
+}
 </style>

--
Gitblit v1.8.0