From c761bc5e98bd6b1fe0900f3cfb1bb4734e1aed47 Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期四, 17 四月 2025 15:45:14 +0800
Subject: [PATCH] change

---
 src/views/nav/Navigation.vue |   45 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/src/views/nav/Navigation.vue b/src/views/nav/Navigation.vue
index 422ee3e..7685fd7 100644
--- a/src/views/nav/Navigation.vue
+++ b/src/views/nav/Navigation.vue
@@ -1,6 +1,23 @@
 <template>
   <div class="navigation">
-    <div class="navigation-content">
+    <div class="navigation-contents" v-show="!simBtn">
+      <div
+        class="navigation-item bg1"
+        :class="{ 'bg1-active': currentIndexs == 1 }"
+        @click="handleClickHome(1)"
+      >
+        缁煎悎灞曠ず
+      </div>
+      <div
+        class="navigation-item bg2"
+        :class="{ 'bg2-active': currentIndexs == 2 }"
+        @click="handleClickHome(2)"
+        style="margin-left: 15%"
+      >
+        妯℃嫙浠跨湡
+      </div>
+    </div>
+    <div class="navigation-content" v-show="simBtn">
       <div
         class="navigation-item bg1"
         :class="{ 'bg1-active': currentIndex == 1 }"
@@ -20,14 +37,14 @@
         :class="{ 'bg3-active': currentIndex == 3 }"
         @click="handleClick(3)"
       >
-        妯℃嫙浠跨湡
+        浠跨湡鎺ㄦ紨
       </div>
       <div
         class="navigation-item bg4"
         :class="{ 'bg4-active': currentIndex == 4 }"
         @click="handleClick(4)"
       >
-        妯℃嫙璇勪及
+        妯℃嫙璇勪环
       </div>
     </div>
     <div class="navigation-bg"></div>
@@ -37,8 +54,10 @@
 <script setup>
 import { useRouter } from "vue-router";
 import { useSimStore } from "@/store/simulation";
-import { ref } from "vue";
+import { ref,watch} from "vue";
 
+const simBtn = ref(false);
+const currentIndexs = ref(1);
 const router = useRouter();
 const simStore = useSimStore();
 const isShow = ref(false);
@@ -67,11 +86,25 @@
     }
     ps.emitMessage(desc);
   }
-
-  // 璺敱璺宠浆
   const routes = ["", "/yhgl", "/zhjc", "/mnfz", "/mnpg"];
   router.push(routes[index]);
 };
+watch(
+    () => simStore.backToHome,
+    (newValue) => {
+        if (newValue) {
+            simBtn.value = false;
+            simStore.setBackToHome(false);
+        }
+    }
+);
+const handleClickHome = (index) => {
+  if (index === 1) {
+    router.push("/");
+  } else {
+    simBtn.value = true;
+  }
+};
 </script>
 
 <style lang="less" scoped>

--
Gitblit v1.9.3