| | |
| | | <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); |
| | |
| | | } |
| | | 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("/"); |