调整月视图单量姓名展示
This commit is contained in:
@@ -148,7 +148,8 @@
|
||||
<span v-else-if="!day.isPast && day.totalCount > 0 && day.dayStatus === 'rest'" class="day-mark rest">休</span>
|
||||
<div v-if="monthDisplayMode === 'count'" class="month-bars">
|
||||
<span v-for="count in day.artistCounts.filter(item => item.count > 0)" :key="String(count.artistId)" :style="{ backgroundColor: count.color }">
|
||||
{{ count.shortName }}{{ count.count }}
|
||||
<b>{{ resolveMonthCountName(count) }}</b>
|
||||
<em>{{ count.count }}</em>
|
||||
</span>
|
||||
<small v-if="day.totalCount === 0">空</small>
|
||||
</div>
|
||||
@@ -329,6 +330,10 @@ const buildExpandedBlocks = (counts: NormalizedCount[]): MonthBlock[] => {
|
||||
})))
|
||||
}
|
||||
|
||||
const resolveMonthCountName = (count: NormalizedCount): string => {
|
||||
return String(count.artistName || count.shortName || '?').slice(0, 3)
|
||||
}
|
||||
|
||||
const buildMonthDays = (): MonthDay[] => {
|
||||
const map = summaryMap(daySummaries.value)
|
||||
const todayText = formatDate(new Date())
|
||||
@@ -893,16 +898,35 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.month-bars span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 4px;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 6px;
|
||||
padding: 1px 4px;
|
||||
padding: 1px 5px;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.month-bars span b {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
font-weight: 800;
|
||||
text-align: left;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.month-bars span em {
|
||||
flex: 0 0 auto;
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.month-bars small,
|
||||
.month-blocks small {
|
||||
color: #b0a79d;
|
||||
|
||||
Reference in New Issue
Block a user