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