Merge remote-tracking branch 'origin/main'

This commit is contained in:
huangyaohui 2026-03-19 13:18:38 +08:00
commit f95b5207a0
4 changed files with 1851 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,107 @@
<template>
<!-- 支持高度传参重要 -->
<!-- height 用到容器里 -->
<!-- <div class="timeline-container" :style="{ height }"> -->
<div class="timeline-container" :style="{ height }">
<div class="timeline">
<div
v-for="(item, index) in list"
:key="index"
class="timeline-item"
>
<!-- 时间 -->
<div class="time">{{ item.time }}</div>
<!-- 线 -->
<div class="line">
<div class="dot" :class="{ active: index === 0 }"></div>
<div
v-if="index !== list.length - 1"
class="vertical-line"
></div>
</div>
<!-- 内容 -->
<div class="content">
{{ item.text }}
</div>
</div>
</div>
</div>
</template>
<script setup>
defineProps({
list: {
type: Array,
default: () => []
},
height: {
type: String,
default: '200px'
}
})
</script>
<style scoped>
.timeline-container {
overflow-y: auto;
padding: 10px;
background-color: rgba(255, 255, 255, 0.8);
}
.timeline-item {
display: flex;
align-items: flex-start;
position: relative;
margin-bottom: 5px;
}
.time {
width: 40px;
color: rgba(45, 103, 237, 0.50);
font-weight: bold;
font-size: 14px;
}
.line {
position: relative;
width: 30px;
display: flex;
justify-content: center;
}
.dot {
width: 10px;
height: 10px;
background: rgba(45, 103, 237, 0.50);
border-radius: 50%;
padding: 8px;
margin-top: 5px;
z-index: 8;
}
.dot.active {
background: rgba(45, 103, 237, 0.50);
width: 10px;
height: 10px;
}
.vertical-line {
position: absolute;
top: 20px;
width: 2px;
height: 70%;
background: rgba(45, 103, 237, 0.50);
}
.content {
flex: 1;
font-size: 14px;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 18em; /* 约等于18个英文字符/接近中文18字宽度 */
}
</style>

File diff suppressed because it is too large Load Diff