diff --git a/src/components/filebrowser/List.vue b/src/components/filebrowser/List.vue index 8f7de8e2..f935c8ba 100644 --- a/src/components/filebrowser/List.vue +++ b/src/components/filebrowser/List.vue @@ -26,6 +26,9 @@ const emit = defineEmits(['loading', 'pathchanged', 'refreshed', 'filedeleted', // 提示框 const $toast = useToast() +// 是否正在加载 +const loading = ref(true) + // 确认框 const createConfirm = useConfirm() @@ -101,6 +104,7 @@ const isImage = computed(() => { // 调API加载内容 async function load() { + loading.value = true emit('loading', true) if (isDir.value) { const url = inProps.endpoints?.list.url @@ -115,6 +119,7 @@ async function load() { items.value = await axiosInstance.value.request(config) ?? [] } emit('loading', false) + loading.value = false } // 删除项目 @@ -295,6 +300,16 @@ onMounted(() => {