This commit is contained in:
iVampireSP.com 2023-12-07 15:09:42 +08:00
parent e306376753
commit d3619e1e32
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -1,29 +1,56 @@
<template> <template>
<div>{{ documents }}</div> <div>{{ documents }}</div>
<div>
<v-row >
<v-col cols="6" md="4">
<v-skeleton-loader
class="mx-auto border"
max-width="300"
type="image, article"
></v-skeleton-loader>
</v-col>
<v-col cols="6" md="4">
<v-skeleton-loader
class="mx-auto border"
max-width="300"
type="image, article"
></v-skeleton-loader>
</v-col>
<v-col cols="6" md="4">
<v-skeleton-loader
class="mx-auto border"
max-width="300"
type="image, article"
></v-skeleton-loader>
</v-col>
</v-row>
</div>
</template> </template>
<script setup> <script setup>
import { document } from '@/plugins/api'; import { document } from "@/plugins/api";
import router from '@/router'; import router from "@/router";
import {ref} from 'vue' import { ref } from "vue";
const libraryId = router.currentRoute.value.params.LibraryId const libraryId = router.currentRoute.value.params.LibraryId;
const page = ref(1) const page = ref(1);
const documents = ref([]) const documents = ref([]);
const loading = ref(false) const loading = ref(false);
function load() { function load() {
loading.value = true loading.value = true;
document.libraryLibraryIdDocumentsGet(libraryId, page.value).then((r) => { document
documents.value = r.data .libraryLibraryIdDocumentsGet(libraryId, page.value)
}).finally(() => { .then((r) => {
loading.value = false documents.value = r.data;
}) })
.finally(() => {
loading.value = false;
});
} }
load() load();
console.log(libraryId) console.log(libraryId);
</script> </script>