比如:
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>
Logo

前往低代码交流专区

更多推荐