fix(tooltip): 保持数值与单位单行显示
All checks were successful
Package component / package (push) Successful in 2m52s
All checks were successful
Package component / package (push) Successful in 2m52s
This commit is contained in:
@@ -77,7 +77,7 @@ function formatError(point: WaveformPoint): string | null {
|
||||
>
|
||||
<i :style="{ backgroundColor: seriesPoint.color }" />
|
||||
<strong v-if="seriesPoint.name">{{ seriesPoint.name }}:</strong>
|
||||
<span>
|
||||
<span class="waveform-tooltip__value">
|
||||
{{ formatTooltipNumber(seriesPoint.point.y)
|
||||
}}{{ seriesPoint.unit ? ` ${seriesPoint.unit}` : '' }}
|
||||
<small v-if="formatError(seriesPoint.point)">{{ formatError(seriesPoint.point) }}</small>
|
||||
@@ -116,7 +116,7 @@ function formatError(point: WaveformPoint): string | null {
|
||||
|
||||
.waveform-tooltip__series {
|
||||
display: grid;
|
||||
grid-template-columns: 8px auto minmax(0, 1fr);
|
||||
grid-template-columns: 8px minmax(0, 1fr) auto;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -134,6 +134,10 @@ function formatError(point: WaveformPoint): string | null {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.waveform-tooltip__value {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.waveform-tooltip__series small {
|
||||
color: #667085;
|
||||
white-space: nowrap;
|
||||
|
||||
Reference in New Issue
Block a user