-
@newcat can you please help me figuring out why my custom ( |
Beta Was this translation helpful? Give feedback.
Answered by
newcat
Jan 14, 2023
Replies: 1 comment 1 reply
-
For Vue 3, adding the <template>
<div>
<textarea :value="value" @input="$emit('input', $event.target.value)" />
</div>
</template>
<script>
export default {
components: {},
props: ["value", "name", "option", "node"],
emits: ["input"],
};
</script> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
klavsbuss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Vue 3, adding the
emits
property is necessary. Also, you can remove the general listener stuff, since it is your custom component and you can add listeners if needed. This makes it more readable.