Created
November 17, 2021 23:33
-
-
Save davidroyer/dd92f8202966465368234be0937cdc11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<label class="font-semibold block text-gray-700" for="input" | |
>Base Input</label | |
> | |
<input | |
type="text" | |
:value="modelValue" | |
@input="$emit('update:modelValue', $event.target.value)" | |
/> | |
<!-- <input type="text" :value="modelValue" @input="handleInput" /> --> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
modelValue: { | |
type: [String, Number], | |
default: '' | |
} | |
}, | |
emits: ['update:modelValue'], | |
methods: { | |
handleInput($event) { | |
this.$emit('update:modelValue', $event.target.value) | |
} | |
} | |
} | |
</script> | |
<style></style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment