在 vuejs 的 html 标签中得到响应
get response in html tag in vuejs
请帮助我如何在 Html 标签中获取数据,就像在 console.loge 中一样,
我想在 <span class="fa fa-heart-o"></span>
中得到这个 console.log(this.likeDes[0].like_dislike)
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>
请帮助我如何在 Html 标签中获取数据,就像在 console.loge 中一样,
我想在 <span class="fa fa-heart-o"></span>
console.log(this.likeDes[0].like_dislike)
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>