vue获取list集合中map的属性的方法
比如:list长这样classifyList:[{"classify":{"uid":3,"createtime":{"date":27,"hours":13,"seconds":53,"month":2,"nanos":0,"timezoneOffset":-480,"year":120,"minutes":38,"time":1585287533000,"day...
·
比如:
list长这样
classifyList: [
{
"classify": {
"uid": 3,
"createtime": {
"date": 27,
"hours": 13,
"seconds": 53,
"month": 2,
"nanos": 0,
"timezoneOffset": -480,
"year": 120,
"minutes": 38,
"time": 1585287533000,
"day": 5
},
"classname": "你好",
"id": 22,
},
"num": 1,
},
{
"classify": {
"uid": 3,
"createtime": {
"date": 27,
"hours": 13,
"seconds": 53,
"month": 2,
"nanos": 0,
"timezoneOffset": -480,
"year": 120,
"minutes": 38,
"time": 1585287533000,
"day": 5
},
"classname": "你好",
"id": 22,
},
"num": 1,
},
{
"classify": {
"uid": 3,
"createtime": {
"date": 27,
"hours": 13,
"seconds": 53,
"month": 2,
"nanos": 0,
"timezoneOffset": -480,
"year": 120,
"minutes": 38,
"time": 1585287533000,
"day": 5
},
"classname": "你好",
"id": 22,
},
"num": 1,
},
]
vue这样获取
<p v-for="item in classifyList">
<a href="#">
<img class="sort-each-img" src="img/sortBlog/1.jpg"/>
<span class="sort-each-name">{{item.classify.classname}}</span>
<span class="sort-each-num">{{item.num}}篇</span>
</a>
</p>
更多推荐
已为社区贡献11条内容
所有评论(0)