Commit 017d643b by 张立顺

fix(venus-usedcar-quality): 样式问题

1 parent 8a2258fb
......@@ -94,9 +94,10 @@ function extractLeafData(leaf: InspectionNodeDetail): {
/**
* 将单个叶子节点(nodeType=3)转换为 InspectItem
*/
function leafToItem(leaf: InspectionNodeDetail): InspectItem {
function leafToItem(leaf: InspectionNodeDetail): InspectItem | null {
const vo = leaf.inspectionResultVO;
const resultStatus = vo?.resultStatus ?? 1;
if (resultStatus === 3) return null;
const { descriptions, images, videos } = extractLeafData(leaf);
return {
name: leaf.nodeName,
......@@ -127,15 +128,15 @@ function buildCategories(nodes: InspectionNodeDetail[]): InspectCategory[] {
const items: InspectItem[] = [];
for (const child of children) {
if (child.nodeType === 3) {
// 情况②:nodeType=1 直接挂 nodeType=3,无中间层
items.push(leafToItem(child));
const item = leafToItem(child);
if (item) items.push(item);
} else {
// 情况①:nodeType=2 中间分组,展开其 nodeType=3 子节点
const leafNodes = (child.childrenNodes ?? []).sort(
(a, b) => a.sortOrder - b.sortOrder
);
for (const leaf of leafNodes) {
items.push(leafToItem(leaf));
const item = leafToItem(leaf);
if (item) items.push(item);
}
}
}
......@@ -437,6 +438,7 @@ onUnmounted(() => {
}
.inspect-detail-scroll {
position: relative;
box-sizing: border-box;
flex: 1;
min-height: 0;
......@@ -449,8 +451,8 @@ onUnmounted(() => {
}
.sticky-header {
flex-shrink: 0;
z-index: 99;
flex-shrink: 0;
background: #fff;
:deep(.van-tabs__content) {
......@@ -458,16 +460,6 @@ onUnmounted(() => {
}
}
.inspect-detail-scroll {
position: relative;
flex: 1;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: calc(40vh + env(safe-area-inset-bottom));
}
.filter-bar {
display: flex;
justify-content: flex-end;
......
......@@ -544,12 +544,12 @@ onMounted(() => {
</ul>
</div>
<div class="score-link" @click="goToInspectDetail">
<!-- <div class="score-link" @click="goToInspectDetail">
查看完整报告和损伤照片
<img alt=""
class="score-link__arrow"
:src="CDN.rightArrow" />
</div>
</div> -->
</div>
<!-- 检测详情 -->
......@@ -590,15 +590,6 @@ onMounted(() => {
class="score-link__arrow"
:src="CDN.rightArrow" />
</div>
<!-- <div class="inspect-more">
<van-button plain
round
size="small"
type="default"
@click="goToInspectDetail">
查看完整检测详情
</van-button>
</div> -->
</div>
<!-- 检测视频 -->
......@@ -705,11 +696,10 @@ onMounted(() => {
height: 100vh;
height: 100dvh;
max-height: 100dvh;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: calc(20px + env(safe-area-inset-bottom));
overflow: hidden auto;
background: #f2f3f7;
-webkit-overflow-scrolling: touch;
}
.report-scroll {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!