自主产品,供应链食堂系统。将两个端拆开了。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.6 KiB

  1. <template>
  2. <view class="content">
  3. <view v-for="(item, index) in list" :key="index"
  4. class="list"
  5. :style="index == list.length - 1 ? 'padding-bottom: 60rpx' : ''">
  6. <view class="left">
  7. <view class="up-line" :class="{'remove-line': index == 0}"
  8. :style="{'border-color': themeColor, 'background-color': themeColor}"></view>
  9. <view class="icon" :style="{
  10. 'background-color': index == list.length - 1 && !item.isFinished ? themeColor : '#fff',
  11. 'border-color': themeColor,
  12. 'color': themeColor}">
  13. <u-icon name="arrow-down" color="#fff" v-if="index == list.length - 1 && !item.isFinished"></u-icon>
  14. <u-icon name="checkmark" v-else></u-icon>
  15. </view>
  16. <view class="down-line" :class="{
  17. 'dotted-line': index == list.length - 1 && !item.isFinished,
  18. 'remove-line': index == list.length - 1 && item.isFinished
  19. }" :style="{'border-color': themeColor, 'background-color': themeColor}">
  20. </view>
  21. </view>
  22. <view class="right">
  23. <view class="desc">
  24. <text class="lf-line-2">{{ item.action }}</text>
  25. <text class="date">{{ item.created_at }}</text>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. name: 'lf-step-bar',
  34. props: {
  35. themeColor: {
  36. type: String,
  37. default: '#1833F2'
  38. },
  39. list: {
  40. type: Array,
  41. default(){
  42. return []
  43. }
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped="scoped">
  49. .content{
  50. width: 100%;
  51. height: max-content;
  52. padding: 0 16px;
  53. }
  54. .list{
  55. display: flex;
  56. align-items: center;
  57. justify-content: space-between;
  58. min-height: 46px;
  59. .left{
  60. display: flex;
  61. flex-direction: column;
  62. justify-content: center;
  63. align-content: center;
  64. align-items: center;
  65. margin-right: 6px;
  66. .up-line,.down-line{
  67. height: 20px;
  68. width: 1px;
  69. border: 1px solid #1833F2;
  70. background-color: #1833F2;
  71. position: relative;
  72. }
  73. .remove-line{
  74. border: none !important;
  75. background-color: transparent !important;
  76. }
  77. .dotted-line::after{
  78. content: '';
  79. position: absolute;
  80. left: -1px;
  81. bottom: -20px;
  82. height: 20px;
  83. width: 0px;
  84. border: 1px dashed #999999;
  85. }
  86. .icon{
  87. width: 30px;
  88. height: 30px;
  89. box-sizing: border-box;
  90. border: 2px solid #1833F2;
  91. color: #1833F2;
  92. border-radius: 50%;
  93. background-color: #fff;
  94. display: flex;
  95. justify-content: center;
  96. align-content: center;
  97. }
  98. }
  99. .right{
  100. flex: auto;
  101. .desc{
  102. position: relative;
  103. font-size: 28rpx;
  104. color: #222222;
  105. .date{
  106. position: absolute;
  107. bottom: -18px;
  108. left: 0;
  109. font-size: 24rpx;
  110. color: #999999;
  111. }
  112. }
  113. }
  114. }
  115. </style>