2
2
<input
3
3
:id =" computedId"
4
4
ref =" input"
5
- :class =" classes "
5
+ :class =" computedClasses "
6
6
:name =" name || undefined"
7
7
:form =" form || undefined"
8
8
:type =" localType"
@@ -59,9 +59,11 @@ export default defineComponent({
59
59
},
60
60
emits: [' update:modelValue' , ' change' , ' blur' , ' input' ],
61
61
setup(props , {emit }) {
62
+ const {input, computedId, computedAriaInvalid, onInput, onChange, onBlur, focus, blur} = useFormInput (props , emit )
63
+
62
64
const isHighlighted = ref (false )
63
65
64
- const classes = computed (() => {
66
+ const computedClasses = computed (() => {
65
67
const isRange = props .type === ' range'
66
68
const isColor = props .type === ' color'
67
69
return {
@@ -80,9 +82,6 @@ export default defineComponent({
80
82
allowedTypes .includes (props .type ) ? props .type : ' text'
81
83
)
82
84
83
- const {input, computedId, computedAriaInvalid, onInput, onChange, onBlur, focus, blur} =
84
- useFormInput (props , emit )
85
-
86
85
const highlight = () => {
87
86
if (isHighlighted .value === true ) return
88
87
isHighlighted .value = true
@@ -92,7 +91,7 @@ export default defineComponent({
92
91
}
93
92
94
93
return {
95
- classes ,
94
+ computedClasses ,
96
95
localType ,
97
96
input ,
98
97
computedId ,
0 commit comments