feat: clarify mobile mileage legend
This commit is contained in:
@@ -73,6 +73,10 @@ test('renders only the desktop matrix with dates as columns and a period total',
|
|||||||
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('0 km已上报、无里程增量');
|
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('0 km已上报、无里程增量');
|
||||||
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('—无可用里程');
|
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('—无可用里程');
|
||||||
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('颜色越深、里程越高');
|
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('颜色越深、里程越高');
|
||||||
|
expect(screen.getByLabelText('移动端里程矩阵读表说明')).toHaveTextContent('左右滑动日期 · 车牌与总里程固定');
|
||||||
|
expect(screen.getByLabelText('0 公里表示已上报、无里程增量')).toHaveTextContent('0 km无增量');
|
||||||
|
expect(screen.getByLabelText('横线表示无可用里程')).toHaveTextContent('—无数据');
|
||||||
|
expect(screen.getByLabelText('颜色越深、里程越高')).toHaveTextContent('色阶深色更高');
|
||||||
const matrixRegion = screen.getByRole('region', { name: '车辆每日里程矩阵,可横向滚动查看日期' });
|
const matrixRegion = screen.getByRole('region', { name: '车辆每日里程矩阵,可横向滚动查看日期' });
|
||||||
expect(matrixRegion).toHaveAttribute('tabindex', '0');
|
expect(matrixRegion).toHaveAttribute('tabindex', '0');
|
||||||
const matrixScroller = matrixRegion.querySelector<HTMLElement>('.semi-table-body');
|
const matrixScroller = matrixRegion.querySelector<HTMLElement>('.semi-table-body');
|
||||||
|
|||||||
@@ -287,11 +287,17 @@ function dateLabel(date: string) {
|
|||||||
|
|
||||||
function MileageMatrixGuide() {
|
function MileageMatrixGuide() {
|
||||||
return <aside id="v2-mileage-matrix-guide" className="v2-mileage-matrix-guide" role="note" aria-label="里程矩阵读表说明">
|
return <aside id="v2-mileage-matrix-guide" className="v2-mileage-matrix-guide" role="note" aria-label="里程矩阵读表说明">
|
||||||
<span className="v2-mileage-matrix-guide-title"><IconInfoCircle /><strong>读表说明</strong></span>
|
<span className="v2-mileage-matrix-guide-title is-desktop-guide"><IconInfoCircle /><strong>读表说明</strong></span>
|
||||||
<span><Tag color="blue" type="light" size="small">0 km</Tag>已上报、无里程增量</span>
|
<span className="is-desktop-guide"><Tag color="blue" type="light" size="small">0 km</Tag>已上报、无里程增量</span>
|
||||||
<span><Tag color="grey" type="light" size="small">—</Tag>无可用里程</span>
|
<span className="is-desktop-guide"><Tag color="grey" type="light" size="small">—</Tag>无可用里程</span>
|
||||||
<span><Tag color="blue" type="light" size="small">色阶</Tag>颜色越深、里程越高</span>
|
<span className="is-desktop-guide"><Tag color="blue" type="light" size="small">色阶</Tag>颜色越深、里程越高</span>
|
||||||
<span className="is-mobile-hint">左右滑动查看日期 · 车牌与总里程固定</span>
|
<span className="is-desktop-guide is-mobile-hint">左右滑动查看日期 · 车牌与总里程固定</span>
|
||||||
|
<span className="v2-mileage-matrix-guide-mobile" aria-label="移动端里程矩阵读表说明">
|
||||||
|
<span className="is-mobile-hint"><IconInfoCircle /><strong>左右滑动日期</strong> · 车牌与总里程固定</span>
|
||||||
|
<span aria-label="0 公里表示已上报、无里程增量"><Tag color="blue" type="light" size="small">0 km</Tag>无增量</span>
|
||||||
|
<span aria-label="横线表示无可用里程"><Tag color="grey" type="light" size="small">—</Tag>无数据</span>
|
||||||
|
<span aria-label="颜色越深、里程越高"><Tag color="blue" type="light" size="small">色阶</Tag>深色更高</span>
|
||||||
|
</span>
|
||||||
</aside>;
|
</aside>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13780,6 +13780,10 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.v2-mileage-matrix-guide > .v2-mileage-matrix-guide-mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.v2-mileage-table-wrap {
|
.v2-mileage-table-wrap {
|
||||||
scrollbar-color: #9eb0c4 #f2f5f9;
|
scrollbar-color: #9eb0c4 #f2f5f9;
|
||||||
scrollbar-gutter: stable;
|
scrollbar-gutter: stable;
|
||||||
@@ -14013,22 +14017,34 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.v2-mileage-matrix-guide {
|
.v2-mileage-matrix-guide {
|
||||||
min-height: 34px;
|
min-height: 58px;
|
||||||
gap: 11px;
|
overflow: hidden;
|
||||||
padding: 4px 9px;
|
gap: 0;
|
||||||
|
padding: 4px 8px 5px;
|
||||||
font-size: 9px;
|
font-size: 9px;
|
||||||
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v2-mileage-matrix-guide-title .semi-icon {
|
.v2-mileage-matrix-guide > .is-desktop-guide {
|
||||||
font-size: 12px;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v2-mileage-matrix-guide-title {
|
.v2-mileage-matrix-guide > .v2-mileage-matrix-guide-mobile {
|
||||||
order: 0;
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
align-items: center;
|
||||||
|
gap: 3px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v2-mileage-matrix-guide > span:not(.v2-mileage-matrix-guide-title):not(.is-mobile-hint) {
|
.v2-mileage-matrix-guide-mobile > span {
|
||||||
order: 2;
|
display: inline-flex;
|
||||||
|
min-width: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
|
color: #66798f;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v2-mileage-matrix-guide .semi-tag {
|
.v2-mileage-matrix-guide .semi-tag {
|
||||||
@@ -14038,13 +14054,19 @@
|
|||||||
font-size: 8px;
|
font-size: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v2-mileage-matrix-guide .is-mobile-hint {
|
.v2-mileage-matrix-guide-mobile > .is-mobile-hint {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
order: 1;
|
min-height: 22px;
|
||||||
|
grid-column: 1 / -1;
|
||||||
color: #3e6798;
|
color: #3e6798;
|
||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.v2-mileage-matrix-guide-mobile > .is-mobile-hint .semi-icon {
|
||||||
|
color: #1268df;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.v2-mileage-source-sidesheet .semi-sidesheet-inner {
|
.v2-mileage-source-sidesheet .semi-sidesheet-inner {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #d9e3ef;
|
border: 1px solid #d9e3ef;
|
||||||
|
|||||||
Reference in New Issue
Block a user