[Vuejs]-How to join two v-html in one

1๐Ÿ‘

I recommend using a method to return your HTML with both your item values

methods: {
  myHTML: function(item) {
    return item.number+"<div>"+item.body+"</div>";
  }
}

And then use your method property myHTML within v-html in your template tag, pass in the item

v-html="myHTML(item)"

Leave a comment