排序:
<el-radio-group v-model="reverse">
<el-radio :label="true">倒序</el-radio>
<el-radio :label="false">正序</el-radio>
</el-radio-group>
时间树属性讲解:
reverse:控制正序还是排序显示
<el-timeline :reverse="reverse">
<el-timeline-item
v-for="(item, index) in progressData"
:key="index"
:timestamp="item.time"
>
{{ item.context }}
</el-timeline-item>
</el-timeline>
data:
data(){
return{
progressData:
[
{
"time": "2018-05-10 09:39:00",
"ftime": "2018-05-10 09:39:00",
"context": "已签收,感谢使用顺丰,期待再次为您服务",
"location": ""
},
{
"time": "2018-05-10 08:23:00",
"ftime": "2018-05-10 08:23:00",
"context": "[北京市]北京海淀育新小区营业点派件员 顺丰速运 95338正在为您派件",
"location": ""
},
]
reverse: false,
}
}