[Vuejs]-Variable in vue v-model

0👍

Try by removing {{ article.header }} from inside of textarea tag because mustache syntax inside textarea tag wont work. Docs:https://vuejs.org/guide/essentials/forms.html#multiline-text and also make changes suggested by @Joyful in the comments.

<script setup>
...
let form = reactive({
  header: '',
});  
...
</script>

<template>
...
<textarea
v-model="form.header"                                
@input="onInputheader"                              
></textarea>
...
</template>

0👍

This is the answer. Need to declare variable to use it in script

let props = defineProps({
  article: String,
});

let form = reactive({
  header: props.article.header,
});

Leave a comment