Created
July 21, 2020 10:11
-
-
Save ravipatel2293/4dcaedcfd9eca148ff4b5886fb5f9f2c 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> | |
<input type="text" :value="hiddenValue" :ref="'inputRef'" @input="handleInput($event)"> | |
</template> | |
<script> | |
export default { | |
name: "Input", | |
model: { | |
prop: "hiddenValue", | |
event: "blur" | |
}, | |
props: { | |
hiddenValue: { | |
type: [String, Number] | |
} | |
}, | |
methods: { | |
handleInput(event) { | |
const vm = this; | |
vm.$emit("blur", event.target.value); | |
} | |
} | |
}; | |
</script> | |
<style scoped> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment