refactor: add defineProps readonly

This commit is contained in:
Net 2024-08-28 09:50:43 +07:00 committed by Methapon Metanipat
parent 7bcdb26c4b
commit 57a32bdd04
2 changed files with 10 additions and 2 deletions

View file

@ -4,7 +4,7 @@ import { SaveButton, UndoButton } from 'components/button';
import { VuePDF, usePDF } from '@tato30/vue-pdf';
const currentFileSelected = ref<string>('');
const currentFileSelected = ref<string>('citizenId');
const file = defineModel<
{
group?: string;
@ -27,6 +27,7 @@ const currentIndexDropdownList = ref(0);
const props = withDefaults(
defineProps<{
treeFile: { label: string; file: { label: string }[] }[];
readonly?: boolean;
dropdownList?: { label: string; value: string }[];
hideAction?: boolean;
}>(),
@ -101,7 +102,13 @@ const { pdf, pages } = usePDF(computed(() => currentFile.value?.url));
<div class="full-width row" stlye="min-height: 500px">
<div>
<div class="q-pa-sm text-center bordered" style="height: 50px">
<q-btn-dropdown icon="mdi-upload" color="info" label="อัปโหลดเอกสาร">
<q-btn-dropdown
:disable="readonly"
icon="mdi-upload"
color="info"
label="อัปโหลดเอกสาร"
d
>
<q-list v-for="(v, i) in dropdownList" :key="v.value">
<q-item
clickable

View file

@ -172,6 +172,7 @@ defineProps<{
<q-tab-panel name="attachment">
<UploadFile
hide-action
:readonly="readonly"
:dropdown-list="uploadFileListCustomer"
v-model:status-ocr="statusOcr"
v-model:file="item.file"