Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue 3 custom input component

<!-- BaseInput.vue component -->

<template>
    <div>
        <h2>Options API</h2>
        <input type="text" :value="modelValue" @input="updateValue" />
    </div>
</template>

<script>
export default {
    props: {
        modelValue: ''
    },
    methods: {
        updateValue(event) {
            this.$emit('update:modelValue', event.target.value);
        }
    }
}
</script>
Source by www.webmound.com #
 
PREVIOUS NEXT
Tagged: #vue #custom #input #component
ADD COMMENT
Topic
Name
8+8 =