月球大数据地理空间分析展示平台-【前端】-月球2期前端
surprise
2024-03-01 12075d0fa73d963ff5d6dbc4727fb95fb6084961
src/components/topBtn.vue
@@ -15,7 +15,10 @@
          />
        </div>
        <div class="menu_second">
          <div class="upTop">
          <div
            class="upTop"
            v-show="item.children &&item.children.length>0 "
          >
            <div class="upimg"></div>
          </div>
          <div class="second_Box">
@@ -82,9 +85,11 @@
} from "vue";
import menuData from "@/assets/js/Map/menuData.js";
import menuTool from "@/assets/js/Map/menuTool.js";
import store from "@/store";
const menuFlag = ref(null);
const menuOptions = ref([]);
const checkFlag = ref(null);
let checkArr = ref([]);
const setMenuClick = (res) => {
  if (res.children) {
    if (menuFlag.value && menuFlag.value == res.id) {
@@ -96,13 +101,19 @@
  } else {
    if (res.level == 1) {
      checkFlag.value = null;
      // console.log(res);
      if (res.name == "清除") {
        menuTool.clearALL(checkArr);
      }
    } else if (res.level == 2) {
      checkFlag.value = res.id;
      checkArr.value.push(res.id);
    }
    menuFlag.value = null;
    menuTool.topTools(res);
  }
};
onMounted(() => {
  menuOptions.value = menuData.topMenu;
});
@@ -110,13 +121,14 @@
<style lang="less" scoped>
.top_btn {
  position: absolute;
  top: 23px;
  right: 0px;
  // position: absolute;
  // top: 23px;
  // right: 0px;
  display: flex;
  cursor: pointer;
  z-index: 30;
  .menu_Box {
    margin-right: 104px;
    margin-right: 50px;
    display: flex;
    .imgIcon {
      width: 30px;
@@ -128,12 +140,14 @@
      margin-right: 7px;
      background: url("../assets/img/topBtn/图标bj.png") no-repeat;
      background-size: 100% 100%;
      opacity: 0.8;
      .First_img {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 1;
      }
    }