改进 路由
This commit is contained in:
parent
b52d4c7152
commit
bc0db5a5be
@ -20,16 +20,17 @@ const routes = [
|
||||
name: "login",
|
||||
component: () => import("@/views/auth/Login.vue"),
|
||||
},
|
||||
{
|
||||
path: "/documents",
|
||||
name: "documents",
|
||||
component: () => import("@/views/documents/List.vue"),
|
||||
},
|
||||
{
|
||||
path: "/libraries",
|
||||
name: "libraries",
|
||||
component: () => import("@/views/libraries/List.vue"),
|
||||
},
|
||||
{
|
||||
path: "/library/:LibraryId/documents",
|
||||
name: "library.documents",
|
||||
component: () => import("@/views/documents/List.vue"),
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
|
@ -73,6 +73,7 @@
|
||||
:length="libraries.Total"
|
||||
:disabled="loading"
|
||||
@update:model-value="load"
|
||||
next-icon
|
||||
></v-pagination>
|
||||
</v-container>
|
||||
</v-col>
|
||||
@ -85,6 +86,7 @@
|
||||
import { library } from "@/plugins/api";
|
||||
import { ref } from "vue";
|
||||
import LoadingComponent from "@/components/Loading.vue";
|
||||
import router from "@/router";
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
@ -117,7 +119,12 @@ const load = (show_load = true) => {
|
||||
load();
|
||||
|
||||
const goto = (libraryId) => {
|
||||
console.log(libraryId);
|
||||
router.push({
|
||||
name: "library.documents",
|
||||
params: {
|
||||
LibraryId: libraryId
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
function isSelected(id) {
|
||||
|
Loading…
Reference in New Issue
Block a user