第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

VUE.js調(diào)用后端數(shù)據(jù)使用v-for時(shí)報(bào)錯(cuò)未定義?

VUE.js調(diào)用后端數(shù)據(jù)使用v-for時(shí)報(bào)錯(cuò)未定義?

慕粉18341035298 2020-02-02 20:50:56
1.v-for使用 ????????????<tr?v-for:?="item?in?websites"?:key='item'> <!--????????????????<td>{{item.id}}</td>--> <!--????????????????<td>{{item.name}}</td>--> <!--????????????????<td>{{item.url}}</td>--> <!--????????????????<td>{{item.alexa}}</td>--> ????????????????<td>{{item.country}}</td>2.script部分import?axios?from?'axios' ????export?default?{ ????????name:?"Websites", ????????data()?{ ????????????return?{ ????????????????websites:[ ????????????????????{ ????????????????????????id:1, ????????????????????????name:"name", ????????????????????????url:"url", ????????????????????????alexa:10, ????????????????????????country:?"test" ????????????????????}, ????????????????] ????????????} ????????}, ????????created(){ ????????????const?_this=this ????????????axios.get("http://localhost:8080/listWebsites").then(function(resp){ ????????????????_this.websites=resp.data ????????????}) ????????} ?????}3.頁(yè)面報(bào)錯(cuò)?Property or method "item" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property4.確認(rèn)已經(jīng)從后端得到了數(shù)據(jù),但是一旦使用v-for后就失敗###求助各位大佬,幫幫忙啊~~~~
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 1326 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)