11<script setup lang="ts">
2- import { type MaskInputOptions , type MaskaDetail } from ' maska'
3- import { vMaska } from ' maska/vue'
42import { type Component , computed , ref } from ' vue'
53import SInputBase , { type Props as BaseProps } from ' ./SInputBase.vue'
64
@@ -10,7 +8,6 @@ export interface Props extends BaseProps {
108 placeholder? : string
119 unitBefore? : Component | string
1210 unitAfter? : Component | string
13- maska? : string | MaskInputOptions
1411 textColor? : TextColor | ((value : string | null ) => TextColor )
1512 align? : Align
1613 disabled? : boolean
@@ -29,7 +26,6 @@ const emit = defineEmits<{
2926 ' input' : [value : string | null ]
3027 ' blur' : [value : string | null ]
3128 ' enter' : [value : string | null ]
32- ' maska' : [detail : MaskaDetail ]
3329}>()
3430
3531const input = ref <HTMLElement | null >(null )
@@ -96,10 +92,6 @@ function emitEnter(e: KeyboardEvent): void {
9692 emit (' enter' , value )
9793}
9894
99- function emitMaska(e : CustomEvent <MaskaDetail >): void {
100- emit (' maska' , e .detail )
101- }
102-
10395function getValue(e : Event | FocusEvent | KeyboardEvent ): string | null {
10496 const value = (e .target as HTMLInputElement ).value
10597
@@ -140,7 +132,6 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
140132 <input
141133 :id =" name"
142134 ref =" input"
143- v-maska =" maska"
144135 class =" input entity"
145136 :class =" inputClasses"
146137 :type =" type ?? 'text'"
@@ -152,7 +143,6 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
152143 @blur =" emitBlur"
153144 @input =" emitInput"
154145 @keypress.enter =" emitEnter"
155- @maska =" emitMaska"
156146 >
157147 <div v-if =" showDisplay" class =" input display" :class =" [textColor]" >
158148 {{ displayValue }}
0 commit comments