diff --git a/04.系统编码/Frontend/.idea/workspace.xml b/04.系统编码/Frontend/.idea/workspace.xml index e1cae3e..6be951b 100644 --- a/04.系统编码/Frontend/.idea/workspace.xml +++ b/04.系统编码/Frontend/.idea/workspace.xml @@ -39,6 +39,7 @@ <workItem from="1638178911648" duration="1742000" /> <workItem from="1638188568745" duration="5341000" /> <workItem from="1638233761575" duration="1033000" /> + <workItem from="1638235051409" duration="42000" /> </task> <servers /> </component> diff --git a/04.系统编码/Frontend/src/App.vue b/04.系统编码/Frontend/src/App.vue index cc508d8..68fb416 100644 --- a/04.系统编码/Frontend/src/App.vue +++ b/04.系统编码/Frontend/src/App.vue @@ -1,10 +1,12 @@ <template> -<!-- <Header />--> - <login/> + <Header v-if="showHeader" /> + <!-- <login/> --> <router-view /> </template> <script lang="ts"> + import { reactive, ref, toRefs, watch } from 'vue'; + import { useRouter } from 'vue-router'; import Header from './components/Shared/Header.vue'; import Login from "./components/Login.vue"; @@ -12,7 +14,15 @@ name: 'App', components: {Login, Header }, setup() { - return {} + const router = useRouter(); + const showHeader = ref(false); + watch(() => router.currentRoute.value.path, + (current, prev) => { + showHeader.value = current === "/Login" ? false : true; + } + ); + + return {showHeader} } } </script> diff --git a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue index 907a54b..eb6880d 100644 --- a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue +++ b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue @@ -30,7 +30,7 @@ </template> <script lang="ts"> -import { reactive, toRefs } from 'vue' + import { reactive, toRefs } from 'vue' export default { name: 'MicrowaveRadiation', setup() { diff --git a/04.系统编码/Frontend/src/router/index.ts b/04.系统编码/Frontend/src/router/index.ts index 86ae68f..be68b13 100644 --- a/04.系统编码/Frontend/src/router/index.ts +++ b/04.系统编码/Frontend/src/router/index.ts @@ -2,17 +2,7 @@ import {createRouter, createWebHashHistory} from 'vue-router'; const routes: any = [ { path: '/', redirect: '/Login'}, - // { - // path: '/MicrowaveRadiation', - // component: () => import('../components/MicrowaveRadiation/Index.vue'), - // children: [ - // { path: '/MicrowaveRadiation', redirect: '/MicrowaveRadiation/VerticalProfile' }, - // { path: 'VerticalProfile', component: () => import('./../components/MicrowaveRadiation/VerticalProfile.vue') }, - // { path: 'ConvectiveIndex', component: () => import('./../components/MicrowaveRadiation/ConvectiveIndex.vue') }, - // { path: 'TLogP', component: () => import('./../components/MicrowaveRadiation/TLogP.vue') }, - // { path: 'BPInversion', component: () => import('./../components/MicrowaveRadiation/BPInversion.vue') } - // ] - // }, + { path: '/Login', component: () => import('../components/Login.vue') }, { path: '/MicrowaveRadiation', component: () => import('../components/MicrowaveRadiation.vue') }, { path: '/RamanLidar', component: () => import('../components/RamanLidar.vue') }, { path: '/SynergyEvaluation', component: () => import('../components/SynergyEvaluation.vue') },