[Vuejs]-How do I fit the value of one v-model into another v-model?

1👍

You cannot use v-model on a <div> because it isn’t an input element.

It seems what you want to do is set text to the comment message when you click the edit button so that it can be edited by the textarea. All you have to do is pass comment.message as the argument:

<button @click="update(comment.message)">

A couple of other things:

  1. You cannot have multiple root elements in your template (you have two root <div> elements). You can just wrap everything in a single <div>.
  2. text has initial value [] which isn’t compatible with a textarea’s v-model; did you mean ''?

Leave a comment