Skip to content

Commit

Permalink
refactor(input): use inline event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Feb 2, 2023
1 parent 49eb1ba commit b88d998
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/anu-vue/src/components/input/AInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ const input = ref<HTMLInputElement>()
const isInputTypeFile = attrs.type && attrs.type === 'file'
const handleChange = (e: Event) => {
const val = (e.target as HTMLInputElement).value
// emit('input', val)
emit('update:modelValue', val)
}
const handleInputWrapperClick = () => {
input.value?.focus()
}
Expand Down Expand Up @@ -59,7 +52,7 @@ const handleInputWrapperClick = () => {
ref="input"
class="a-input-input"
:value="props.modelValue"
@input="handleChange"
@input="e => { $emit('update:modelValue', (e.target as HTMLInputElement).value) }"
>
</template>
</ABaseInput>
Expand Down

0 comments on commit b88d998

Please sign in to comment.