2023-12-06 02:07:39 +00:00
|
|
|
<template>
|
2023-12-07 06:58:43 +00:00
|
|
|
<div>{{ documents }}</div>
|
2023-12-06 02:07:39 +00:00
|
|
|
</template>
|
|
|
|
|
2023-12-07 06:39:34 +00:00
|
|
|
<script setup>
|
2023-12-07 06:58:43 +00:00
|
|
|
import { document } from '@/plugins/api';
|
2023-12-07 06:39:34 +00:00
|
|
|
import router from '@/router';
|
2023-12-07 06:58:43 +00:00
|
|
|
import {ref} from 'vue'
|
2023-12-07 06:39:34 +00:00
|
|
|
|
|
|
|
const libraryId = router.currentRoute.value.params.LibraryId
|
2023-12-07 06:58:43 +00:00
|
|
|
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
|
|
|
|
})
|
|
|
|
}
|
2023-12-07 06:39:34 +00:00
|
|
|
|
2023-12-07 06:58:43 +00:00
|
|
|
load()
|
2023-12-07 06:39:34 +00:00
|
|
|
console.log(libraryId)
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|