This commit is contained in:
iVampireSP.com 2023-12-07 14:58:43 +08:00
parent 6e99fb5413
commit e306376753
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
4 changed files with 24 additions and 4 deletions

View File

@ -49,7 +49,7 @@ const drawer = ref(false);
const items = [ const items = [
{ icon: "mdi-home", text: "首页", to: { name: "home" } }, { icon: "mdi-home", text: "首页", to: { name: "home" } },
{ icon: "mdi-home", text: "资料库", to: { name: "libraries" } }, { icon: "mdi-home", text: "资料库", to: { name: "libraries" } },
{ icon: "mdi-history", text: "Frequently contacted", to: "/documents" }, // { icon: "mdi-history", text: "Frequently contacted", to: "/documents" },
{ icon: "mdi-content-copy", text: "login", to: "/auth/login" }, { icon: "mdi-content-copy", text: "login", to: "/auth/login" },
]; ];
</script> </script>

View File

@ -1,5 +1,8 @@
<template> <template>
<div>
<HelloWorld /> <HelloWorld />
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -1,13 +1,28 @@
<template> <template>
<div>a</div> <div>{{ documents }}</div>
</template> </template>
<script setup> <script setup>
import { document } from '@/plugins/api';
import router from '@/router'; import router from '@/router';
import {ref} from 'vue'
const libraryId = router.currentRoute.value.params.LibraryId const libraryId = router.currentRoute.value.params.LibraryId
const page = ref(1)
const documents = ref([])
const loading = ref(false)
function load() {
loading.value = true
document.libraryLibraryIdDocumentsGet(libraryId, page.value).then((r) => {
documents.value = r.data
}).finally(() => {
loading.value = false
})
}
load()
console.log(libraryId) console.log(libraryId)

View File

@ -1,4 +1,5 @@
<template> <template>
<div>
<LoadingComponent v-if="loading"> </LoadingComponent> <LoadingComponent v-if="loading"> </LoadingComponent>
<div v-else> <div v-else>
<h1>资料库</h1> <h1>资料库</h1>
@ -79,6 +80,7 @@
</v-row> </v-row>
</v-container> </v-container>
</div> </div>
</div>
</template> </template>
<script setup> <script setup>