fix: load skeleton

This commit is contained in:
setthawutttty 2025-08-15 11:00:12 +07:00
parent 016f9f0642
commit 01dc0ad348
5 changed files with 85 additions and 66 deletions

View file

@ -598,19 +598,20 @@ async function uploadFileDoc(uploadUrl: string, file: any) {
}
/** ดึงข้อมูล */
const isLoadUpload = ref<boolean>(false);
async function getData() {
showLoader();
isLoadUpload.value = true;
await http
.get(config.API.file("แบบกำหนดข้อตกลง", "KPI", id.value))
.then((res) => {
fileList.value = res.data;
isLoadUpload.value = false;
})
.catch((e) => {
messageError($q, e);
isLoadUpload.value = false;
})
.finally(() => {
hideLoader();
});
.finally(() => {});
}
/**
@ -1355,7 +1356,11 @@ onMounted(async () => {
</q-file>
</div>
<div v-if="fileList.length > 0" class="col-xs-12 row">
<div class="col-12" v-if="isLoadUpload">
<q-skeleton height="50px" />
</div>
<div v-else-if="fileList.length > 0" class="col-xs-12 row">
<q-list class="full-width rounded-borders" bordered separator>
<q-item
clickable