<template>
  <el-empty v-if="!records.length" description="暂无物流信息" :image-size="100" />
  <el-timeline v-else>
    <el-timeline-item
      v-for="(item, index) in records"
      :key="index"
      :timestamp="item.time"
    >
      <div>{{ item.title }}</div>
      {{ item.description }}
    </el-timeline-item>
  </el-timeline>
</template>

<script setup>
  const props = defineProps({
    records: {
      type: Array,
      default: () => []
    },
    title: {
      type: String,
      default: ''
    }
  });
</script>
