From f834f3b7549e9c3ea726fa78a72b897d9b7aa50d Mon Sep 17 00:00:00 2001 From: provira Date: Fri, 10 Jan 2025 07:52:22 +0100 Subject: [PATCH] feat: refs #8258 added button to pass to uppercase --- src/components/common/VnInput.vue | 28 ++++++++++++++++--- .../Customer/Card/CustomerFiscalData.vue | 1 + src/pages/Customer/CustomerList.vue | 5 ++++ .../Supplier/Card/SupplierFiscalData.vue | 1 + src/pages/Supplier/SupplierList.vue | 7 +++-- 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index c45f7d073..e921d8e1f 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -49,15 +49,11 @@ const $props = defineProps({ }); const vnInputRef = ref(null); -const showPassword = ref(false); const value = computed({ get() { return $props.modelValue; }, set(value) { - if ($props.uppercase && typeof value === 'string') { - value = value.toUpperCase(); - } if ($props.emptyToNull && value === '') value = null; emit('update:modelValue', value); }, @@ -124,6 +120,10 @@ const handleInsertMode = (e) => { input.setSelectionRange(cursorPos + 1, cursorPos + 1); }); }; + +const handleUppercase = () => { + value.value = value.value?.toUpperCase() || ''; +}; + + + en: + inputMin: Must be more than {value} + maxLength: The value exceeds {value} characters + inputMax: Must be less than {value} + es: + inputMin: Debe ser mayor a {value} + maxLength: El valor excede los {value} carácteres + inputMax: Debe ser menor a {value} + \ No newline at end of file diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue index aff7deda4..8f2c4efb0 100644 --- a/src/pages/Customer/Card/CustomerFiscalData.vue +++ b/src/pages/Customer/Card/CustomerFiscalData.vue @@ -44,6 +44,7 @@ function handleLocation(data, location) { :required="true" :rules="validate('client.socialName')" clearable + uppercase="true" v-model="data.socialName" >