Gunakan V-Model dalam Komponen Kustom
/******************/
/* CUSTOM ELEMENT */
/******************/
<template>
<!-- Everithing you whant -->
<input :value="value" @input="$emit('input',$event.target.value)"/>
</template>
<script>
export default {
name: "CustomElement",
props: {
value: {
type: String,
default: ""
}
}
}
</script>
/******************/
/* PARENT ELEMENT */
/******************/
<CustomElement v-model="someVariable" />
Robotechnic