fix loss style for async load

This commit is contained in:
Timi
2025-07-22 15:25:44 +08:00
parent 74aaa8f806
commit f5c10bf892
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,7 @@
import { createRouter, createWebHistory } from "vue-router"; import { createRouter, createWebHistory } from "vue-router";
import repository from "./repository"; import repository from "./repository";
import IndexLayout from "@/layout/IndexLayout.vue";
import RepositoryList from "@/views/index/RepositoryList.vue";
export default createRouter({ export default createRouter({
history: createWebHistory("/"), history: createWebHistory("/"),
@ -8,12 +10,12 @@ export default createRouter({
// 主路由 // 主路由
path: "/", path: "/",
name: "IndexLayout", name: "IndexLayout",
component: () => import("@/layout/IndexLayout.vue"), component: IndexLayout,
children: [ children: [
{ {
path: "/", path: "/",
name: "RepositoryList", name: "RepositoryList",
component: () => import("@/views/index/RepositoryList.vue") component: RepositoryList
}, },
{ {
path: "/log", path: "/log",

View File

@ -1,7 +1,9 @@
import RepositoryLayout from "@/layout/RepositoryLayout.vue";
export default { export default {
path: "/:repository", path: "/:repository",
name: "RepositoryLayout", name: "RepositoryLayout",
component: () => import("@/layout/RepositoryLayout.vue"), component: RepositoryLayout,
children: [ children: [
{ {
path: ":branch", path: ":branch",