feat: refs #8258 added uppercase option to VnInput
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
1e8e2aff72
commit
dfd7ba9379
|
@ -42,6 +42,10 @@ const $props = defineProps({
|
|||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
uppercase: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const vnInputRef = ref(null);
|
||||
|
@ -50,6 +54,9 @@ const value = computed({
|
|||
return $props.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
if ($props.uppercase && typeof value === 'string') {
|
||||
value = value.toUpperCase();
|
||||
}
|
||||
if ($props.emptyToNull && value === '') value = null;
|
||||
emit('update:modelValue', value);
|
||||
},
|
||||
|
@ -169,6 +176,7 @@ const handleInsertMode = (e) => {
|
|||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
|
@ -179,8 +187,3 @@ const handleInsertMode = (e) => {
|
|||
maxLength: El valor excede los {value} carácteres
|
||||
inputMax: Debe ser menor a {value}
|
||||
</i18n>
|
||||
<style lang="scss">
|
||||
.q-field__append {
|
||||
padding-inline: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -50,6 +50,9 @@ const columns = computed(() => [
|
|||
isTitle: true,
|
||||
create: true,
|
||||
columnClass: 'expand',
|
||||
attrs: {
|
||||
uppercase: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -24,8 +24,13 @@ const columns = computed(() => [
|
|||
label: t('globals.name'),
|
||||
name: 'socialName',
|
||||
create: true,
|
||||
attrs: {
|
||||
uppercase: true,
|
||||
},
|
||||
columnFilter: {
|
||||
name: 'search',
|
||||
name: 'search',attrs: {
|
||||
uppercase: false,
|
||||
},
|
||||
},
|
||||
isTitle: true,
|
||||
},
|
||||
|
|
|
@ -138,7 +138,11 @@ function uppercaseStreetModel(data) {
|
|||
return {
|
||||
get: () => (data.street ? data.street.toUpperCase() : ''),
|
||||
set: (value) => {
|
||||
if (value) {
|
||||
data.street = value.toUpperCase();
|
||||
} else {
|
||||
data.street = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue