Skip to content

Instantly share code, notes, and snippets.

@jaydson
Created March 22, 2021 14:24
Show Gist options
  • Save jaydson/6315224abf1573c21ec25a03a27df140 to your computer and use it in GitHub Desktop.
Save jaydson/6315224abf1573c21ec25a03a27df140 to your computer and use it in GitHub Desktop.
<!-- CustomInput.vue -->
<template>
<label>
{{ label }}
<input type="text" :name="name" v-model="value" />
</label>
</template>
<script>
export default {
name: 'CustomInput',
props: {
label: {
type: String,
required: true,
},
value: {
type: String,
required: true,
},
},
computed: {
name() {
return this.label.toLowerCase();
},
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment