改进
This commit is contained in:
parent
6e99fb5413
commit
e306376753
@ -49,7 +49,7 @@ const drawer = ref(false);
|
||||
const items = [
|
||||
{ icon: "mdi-home", text: "首页", to: { name: "home" } },
|
||||
{ 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" },
|
||||
];
|
||||
</script>
|
||||
|
@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<HelloWorld />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,13 +1,28 @@
|
||||
<template>
|
||||
<div>a</div>
|
||||
<div>{{ documents }}</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { document } from '@/plugins/api';
|
||||
import router from '@/router';
|
||||
|
||||
import {ref} from 'vue'
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<LoadingComponent v-if="loading"> </LoadingComponent>
|
||||
<div v-else>
|
||||
<h1>资料库</h1>
|
||||
@ -79,6 +80,7 @@
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
Loading…
Reference in New Issue
Block a user