甘特图组件,有点改炸了

This commit is contained in:
砂糖
2025-07-16 14:23:42 +08:00
parent 62ef81065c
commit 5e1afb293e
12 changed files with 617 additions and 11 deletions

View File

@@ -0,0 +1,36 @@
<template>
<view class="timeline-header">
<view v-for="tick in config.ticks" :key="tick.label" class="timeline-tick" :style="{ left: tick.left + 'px' }">
{{ tick.label }}
</view>
</view>
</template>
<script>
export default {
name: 'TimelineHeader',
props: {
config: {
type: Object,
required: true
}
}
}
</script>
<style scoped>
.timeline-header {
position: relative;
height: 32px;
background: #f7f7f7;
border-bottom: 1px solid #eee;
overflow-x: auto;
white-space: nowrap;
}
.timeline-tick {
position: absolute;
top: 0;
width: 80px;
text-align: center;
color: #888;
font-size: 12px;
}
</style>