从element官网上的源码,不能从后端获得数据,也就不能得到我们需要的建议
所以需要这样修改
loadAll() {
this.$http.get('http://120.48.109.174:8081/area/city?level=1').then(
res => {
console.log(res.data.body);
this.blogs = res.data.body
this.blogtitle = []
for (let item of this.blogs) {
this.blogtitle.push({ 'value': item.label })
}
this.restaurants = this.blogtitle
})
},