From 1c24168d6f7217afd4c22551b0bd13e830a00be7 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Mon, 19 Aug 2024 14:43:42 +0700 Subject: [PATCH] fix(02): empty value show '-' --- .../02_personnel-management/FormByType.vue | 52 +++++++++++++++---- .../FormInformation.vue | 4 +- .../02_personnel-management/FormPerson.vue | 44 +++++++++++++--- 3 files changed, 81 insertions(+), 19 deletions(-) diff --git a/src/components/02_personnel-management/FormByType.vue b/src/components/02_personnel-management/FormByType.vue index ad833a70..cfca51c6 100644 --- a/src/components/02_personnel-management/FormByType.vue +++ b/src/components/02_personnel-management/FormByType.vue @@ -152,7 +152,11 @@ watch( :readonly="readonly" :label="$t('formDialogInputRegisNo')" class="col-12" - v-model="registrationNo" + :model-value="readonly ? registrationNo || '-' : registrationNo" + @update:model-value=" + (v) => (typeof v === 'string' ? (registrationNo = v) : '') + " + @clear="registrationNo = ''" />