แก้ ui ดาวน์โหลด

This commit is contained in:
STW_TTTY\stwtt 2024-09-24 11:39:26 +07:00
parent 0290f5cd77
commit e89eeeaba3
3 changed files with 23 additions and 17 deletions

View file

@ -24,6 +24,7 @@ const {
} = mixin;
const isChangeData = defineModel<boolean>("isChangeData", { required: true });
const isAttachment = defineModel<boolean>("isAttachment", { required: true });
const { onCheckChangeData } = defineProps({
onCheckChangeData: { type: Function, required: true },
});
@ -33,7 +34,6 @@ const page = ref<number>(1);
const numOfPages = ref<number>(0); // pdf
const pdfSrc = ref<PDFDocumentLoadingTask | undefined>(); // pdf
const isAttachment = ref<boolean>(true);
const dialog = ref<boolean>(false); // dialog
/**
@ -178,7 +178,11 @@ onMounted(async () => {
<div class="q-pr-sm">คำส</div>
</div>
<div @click="setTab('second')" :class="getClass(tab == 'second')">
<div
v-if="isAttachment"
@click="setTab('second')"
:class="getClass(tab == 'second')"
>
<div class="q-pr-sm">เอกสารแนบทาย</div>
</div>
<q-space />
@ -195,24 +199,23 @@ onMounted(async () => {
<div class="q-pa-sm">
<div class="q-pa-sm row q-gutter-sm">
<q-btn
flat
dense
round
color="red"
icon="mdi-file-pdf"
icon-right="mdi-file-pdf"
label="ดาวน์โหลด ไฟล์ .PDF"
@click="downloadCover('pdf')"
class="q-pa-sm"
>
<q-tooltip>ไฟล .PDF</q-tooltip>
</q-btn>
<q-btn
flat
class="q-pa-sm"
dense
round
color="blue"
icon="mdi-file-word"
icon-right="mdi-file-word"
label="ดาวน์โหลด ไฟล์ .docx"
@click="downloadCover('docx')"
>
<q-tooltip>ไฟล .docx</q-tooltip>
</q-btn>
</div>
<q-card bordered class="card-pdf q-mx-sm q-pa-md">