应用层PC端前端服务

expressDeliveryDialog.vue 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="快递信息"
  5. :visible="showDelivery"
  6. @close="cancel"
  7. center
  8. :distroy-on-close="true"
  9. >
  10. <div class="deliverName">中通快递 85644454542121</div>
  11. <el-divider></el-divider>
  12. <el-timeline :reverse="reverse">
  13. <el-timeline-item
  14. v-for="(activity, index) in activities"
  15. :key="index"
  16. :timestamp="activity.timestamp"
  17. >
  18. {{ activity.content }}
  19. </el-timeline-item>
  20. </el-timeline>
  21. <div slot="footer" class="dialog-footer">
  22. <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
  23. </div>
  24. </el-dialog>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. props: ["showDelivery"],
  30. data() {
  31. return {
  32. // key: value
  33. reverse: true,
  34. activities: [
  35. {
  36. content: "已下单 08-18 10:11",
  37. timestamp: "已下单",
  38. },
  39. {
  40. content: "已接单 08-19 10:11",
  41. timestamp: "已接单",
  42. },
  43. {
  44. content: "已发货 08-19 10:11",
  45. timestamp: "已发货",
  46. },
  47. {
  48. content: "已揽件 08-20 00:11",
  49. timestamp: "已揽件",
  50. },
  51. {
  52. content: "运输中 08-20 02:11",
  53. timestamp: "运输中",
  54. },
  55. {
  56. content: "派送中 08-22 10:11",
  57. timestamp: "【西安市】快递已到达西安市临潼区",
  58. },
  59. {
  60. content: "待取件 08-23 15:11",
  61. timestamp: "【西安市】快递已到达菜鸟驿站",
  62. },
  63. ],
  64. };
  65. },
  66. methods: {
  67. cancel() {
  68. this.$emit("closeDeliveryModel");
  69. },
  70. },
  71. };
  72. </script>
  73. <style lang="scss" scoped>
  74. ::v-deep .el-dialog {
  75. width: 600px;
  76. background: #ffffff;
  77. border-radius: 20px;
  78. }
  79. .deliverName {
  80. margin-left: 6%;
  81. font-size: 16px;
  82. font-weight: 500;
  83. }
  84. .endbutton {
  85. width: 154px;
  86. height: 37px;
  87. background: #ffffff;
  88. border: 1px solid #d0d0d0;
  89. border-radius: 19px;
  90. span {
  91. width: 31px;
  92. height: 13px;
  93. font-size: 16px;
  94. font-family: Microsoft YaHei;
  95. font-weight: 400;
  96. color: #959595;
  97. }
  98. }
  99. </style>