su-time-line.vue 751 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <view class="u-time-axis"><slot /></view>
  3. </template>
  4. <script>
  5. /**
  6. * timeLine 时间轴
  7. * @description 时间轴组件一般用于物流信息展示,各种跟时间相关的记录等场景。
  8. * @tutorial https://www.uviewui.com/components/timeLine.html
  9. * @example <u-time-line></u-time-line>
  10. */
  11. export default {
  12. name: 'u-time-line',
  13. data() {
  14. return {};
  15. },
  16. };
  17. </script>
  18. <style lang="scss" scoped>
  19. .u-time-axis {
  20. padding-left: 40rpx;
  21. position: relative;
  22. }
  23. .u-time-axis::before {
  24. content: ' ';
  25. position: absolute;
  26. left: 0;
  27. top: 12rpx;
  28. width: 1px;
  29. bottom: 0;
  30. border-left: 1px solid #ddd;
  31. transform-origin: 0 0;
  32. transform: scaleX(0.5);
  33. }
  34. </style>