-3

请帮助我,我怎样才能像在console.loge中一样在Html标签中获取数据,我想把它放进console.log(this.likeDes[0].like_dislike)<span class="fa fa-heart-o"></span>

4

1 回答 1

1

var app = new Vue({
  el: "#app",
  data: {
    likes: 5
  }
})

// You may replace 5 with the likes count.
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>

<link href = "https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel = "stylesheet">

<div id = "app">
  <i class="fa fa-heart-o"> {{likes}}</i>
</div>

于 2020-07-09T05:24:28.523 回答