fix: the page doesn't need to be re-rendered when the url changes (#87)

This commit is contained in:
Fine0830
2022-05-13 14:40:18 +08:00
committed by GitHub
parent 784c2e97b8
commit 918791f7ed
3 changed files with 4 additions and 4 deletions

View File

@@ -113,11 +113,11 @@ import { useAppStoreWithOut } from "@/store/modules/app";
const appStore = useAppStoreWithOut();
const { t } = useI18n();
const name = ref<any>(String(useRouter().currentRoute.value.name));
const name = ref<string>(String(useRouter().currentRoute.value.name));
const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "")
? ref("light")
: ref("black");
const routes = ref<any>(useRouter().options.routes);
const routes = ref<RouteRecordRaw[] | any>(useRouter().options.routes);
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
appStore.setIsMobile(true);
} else {