Timeline.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div class="block">
  3. <el-timeline>
  4. <el-timeline-item v-for="(item,index) of timeline" :key="index" :timestamp="item.timestamp" placement="top">
  5. <el-card>
  6. <h4>{{ item.title }}</h4>
  7. <p>{{ item.content }}</p>
  8. </el-card>
  9. </el-timeline-item>
  10. </el-timeline>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. timeline: [
  18. {
  19. timestamp: '2019/4/20',
  20. title: 'Update Github template',
  21. content: 'PanJiaChen committed 2019/4/20 20:46'
  22. },
  23. {
  24. timestamp: '2019/4/21',
  25. title: 'Update Github template',
  26. content: 'PanJiaChen committed 2019/4/21 20:46'
  27. },
  28. {
  29. timestamp: '2019/4/22',
  30. title: 'Build Template',
  31. content: 'PanJiaChen committed 2019/4/22 20:46'
  32. },
  33. {
  34. timestamp: '2019/4/23',
  35. title: 'Release New Version',
  36. content: 'PanJiaChen committed 2019/4/23 20:46'
  37. }
  38. ]
  39. }
  40. }
  41. }
  42. </script>