CNCEC_APP/uni_modules/uview-pro/components/u-time-line/u-time-line.vue

54 lines
1.1 KiB
Vue
Raw Normal View History

2026-03-25 14:54:15 +08:00
<template>
<view class="u-time-axis" :class="customClass" :style="$u.toStyle(customStyle)">
<slot />
</view>
</template>
<script lang="ts">
export default {
name: 'u-time-line',
options: {
addGlobalClass: true,
// #ifndef MP-TOUTIAO
virtualHost: true,
// #endif
styleIsolation: 'shared'
}
};
</script>
<script setup lang="ts">
import { baseProps } from '../common/props';
import { $u } from '../../';
/**
* timeLine 时间轴
* @description 时间轴组件一般用于物流信息展示各种跟时间相关的记录等场景
* @tutorial https://uviewpro.cn/zh/components/timeLine.html
* @example <u-time-line></u-time-line>
*/
const props = defineProps({ ...baseProps });
</script>
<style lang="scss" scoped>
@import '../../libs/css/style.components.scss';
.u-time-axis {
padding-left: 40rpx;
position: relative;
}
.u-time-axis::before {
content: ' ';
position: absolute;
left: 0;
top: 12rpx;
width: 1px;
bottom: 0;
border-left: 1px solid var(--u-divider-color);
transform-origin: 0 0;
transform: scaleX(0.5);
}
</style>