Commit 1c78091e authored by zL's avatar zL

精简代码

parent aae41d27
...@@ -45,11 +45,19 @@ export default { ...@@ -45,11 +45,19 @@ export default {
currentRoute: 0, currentRoute: 0,
}; };
}, },
mounted() {
if (this.$route.path === "/userCenter") {
this.currentRoute = 2;
} else {
this.currentRoute = 1;
}
},
methods: { methods: {
selectPage(idnex, path) { selectPage(idnex, path) {
if (idnex === 1) { if (idnex === 1) {
window.open(UrlPrefixObj.model.CHAIN_BROWSER_URL_PREFIX); window.open(UrlPrefixObj.model.CHAIN_BROWSER_URL_PREFIX);
} else { } else {
if (this.currentRoute === idnex) return;
this.currentRoute = idnex; this.currentRoute = idnex;
this.$router.push({ path: path }); this.$router.push({ path: path });
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue } from "vue-property-decorator"; import { Component, Vue } from "vue-property-decorator";
import MainHeader from "./MainHeader.vue"; import MainHeader from "./MainHeader.vue";
import MainMenu from "./MainMenu.vue"; import MainMenu from "@/components/MainMenu.vue";
@Component({ @Component({
components: { components: {
MainMenu, MainMenu,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment