|
|
|
@ -1,4 +1,6 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { useAuthSession } from '../../../composables/useAuthSession' |
|
|
|
|
|
|
|
definePageMeta({ title: '媒体库' }) |
|
|
|
|
|
|
|
type MediaAssetRow = { |
|
|
|
@ -12,6 +14,7 @@ type MediaAssetRow = { |
|
|
|
} |
|
|
|
|
|
|
|
const toast = useToast() |
|
|
|
const { refresh: refreshAuth } = useAuthSession() |
|
|
|
const { fetchData, getApiErrorMessage } = useClientApi() |
|
|
|
|
|
|
|
const page = ref(1) |
|
|
|
@ -70,13 +73,14 @@ watch(pageSize, () => { |
|
|
|
page.value = 1 |
|
|
|
}) |
|
|
|
|
|
|
|
watch( |
|
|
|
[page, pageSize], |
|
|
|
() => { |
|
|
|
void load() |
|
|
|
}, |
|
|
|
{ immediate: true }, |
|
|
|
) |
|
|
|
watch([page, pageSize], () => { |
|
|
|
void load() |
|
|
|
}) |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
void refreshAuth(true) |
|
|
|
void load() |
|
|
|
}) |
|
|
|
|
|
|
|
function openFilePicker() { |
|
|
|
fileInput.value?.click() |
|
|
|
|