<div class="grid-content bg-puprple-light" v-for="(value, key, index) in reverseblogList.slice((currentPage-1)*pageSize,currentPage*pageSize)">
    <el-row type="flex" class="row-bg" justify="space-around">
        <el-col :span="20">
            <div class="grid-content bg-puprple-light">
                <h1>{{ value.fields.title }}</h1>
                <h4>{{ value.fields.timestamp }}</h4>
                <p>{{ value.fields.body.substring(0,100)+'......' }}</p>
            </div>
        </el-col>
    </el-row>
</div>

把你要反转的json对象使用reverse()函数反转 

computed: {
    reverseblogList() {
        return this.blogList.reverse();
    }
},

 

Logo

前往低代码交流专区

更多推荐