From 83944bc2dc0f9953566ed592b298c33fb3dd3f2e Mon Sep 17 00:00:00 2001
From: YANGDL <114714267@qq.com>
Date: 星期六, 13 三月 2021 20:24:56 +0800
Subject: [PATCH] 修改了界面自适应

---
 src/components/panel/LegendPanel.vue |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/components/panel/LegendPanel.vue b/src/components/panel/LegendPanel.vue
index 82c7db8..afd7d70 100644
--- a/src/components/panel/LegendPanel.vue
+++ b/src/components/panel/LegendPanel.vue
@@ -2,7 +2,7 @@
   <div class="legend-panel">
 
     <transition name="fade">
-      <div class="legend-content map-background" v-show="legendControl">
+      <div :class="'legend-content map-background'" v-show="legendControl">
         <div class="legend-content-box" v-for="(item,index) in legendContents" :key="index">
           <p><span>{{ item.title }}</span></p>
           <div :class="index === 5 ? '':'map-under-line'"></div>
@@ -19,8 +19,8 @@
         </div>
       </div>
     </transition>
-    <el-tooltip popper-class="map-tooltip" effect="dark" content="鍥句緥" placement="left">
-      <div class="legend-btn" @click="legendChange()">
+    <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="鍥句緥" placement="left">
+      <div :class="this.legendControl?'legend-btn map-btn-active':'legend-btn map-btn-unactive'" @click="legendChange()">
         <i class="el-icon-more-outline"></i>
 <!--        <span>鍥句緥</span>-->
       </div>
@@ -146,10 +146,6 @@
     // 鍥炬爣 鎺у埗鍐呭鐨勫睍绀轰笌闅愯棌
     legendChange () {
       this.legendControl = !this.legendControl
-      if (!this.legendControl) {
-        return document.getElementsByTagName('legend-btn')[0].classList.add('btn-active')
-      }
-      return document.getElementsByTagName('legend-btn')[0].classList.remove('btn-active')
     }
   }
 }
@@ -157,7 +153,6 @@
 
 <style lang="less" >
 @import '@assets/css/map/_map-variable';
-@import '@assets/css/map/map-elem-ui';
 .legend-panel {
   position: absolute;
   z-index: 502;
@@ -193,7 +188,7 @@
     background: @background-color;
     margin-top: .04167rem;
     cursor: pointer;
-    color: @color;
+    //color: @color;
     margin-left: auto;
     font-size: 0.08333rem;
   }

--
Gitblit v1.8.0