add Weibo components to the loop:
<div class="itemlist" v-for="itemw in weiboList">
<div class="titleDiv">
<div class="textArt" :class="{"textActive":!itemw.state}" v-html="itemw.content"></div>
</div>
<wb:like appkey="5q5ekV" type="simple"></wb:like>
<wb:share-button appkey="333" :title="itemw.content" addition="simple" type="button" ralateUid="22" language="zh_cn""></wb:share-button>
<wb:follow-button uid="1" type="red_1" width="67" height="24"></wb:follow-button>
</div>
reference in the current interface:
head() {
return {
title: this.mataTitle,
meta: [
{property:"og:type",content: "article",name:"type"},
{property:"og:url",content: "http://m.weibo.cn/2190519260",name:"url"},
{property:"og:title",content: "",name:"title"},
{property:"og:description",content: ""}
],
script: [
{ src: "https://tjs.sjs.sinajs.cn/open/api/js/wb.js" }
]
}
},
API method:
mounted: function () {
//
http.get("weibo/list").then(function (response) {
_this.weiboList = response.list;
})
}
component reports an error:
but if I write the component outside the loop, it will show the component even though it reports an error, why it doesn"t show the component when written inside the loop.
and