salix-front/src/components/common/VnAccountNumber.vue

15 lines
446 B
Vue

<script setup>
import VnInput from './VnInput.vue';
import { useAccountShortToStandard } from 'src/composables/useAccountShortToStandard';
const model = defineModel({ prop: 'modelValue' });
</script>
<template>
<VnInput
v-model="model"
ref="inputRef"
@keydown.tab="model = useAccountShortToStandard($event.target.value) ?? model"
@input="model = $event.target.value.replace(/[^\d.]/g, '')"
/>
</template>