<div id="example" v-show="willShow">
<div class="theme-popover" >
<div id="app">
<span v-text="status"></span>
<div v-for="d in data">{{d.site_id}}:<span>{{d.site_name}}</span></div>
</div>
</div>
</div>
没看到js逻辑部分,我猜你是没有将异步取到的json数据赋值,应该在ready或complied中初始化数据
demo 拿走不谢 https://github.com/TIGERB/eas...
你看看是没渲染还是没拿到数据还是d.site_name这种格式不对,你先console.log()打印返回的数据看看
你的 js 是怎样的呢,我这样写是可以渲染的:
export default{
data(){
return{
data: [{
"site_id": 1,
"site_name": 'google'
}, {
"site_id": 2,
"site_name": 'facebook'
}]
}
}
}