diff --git a/components-diy/diy-category.vue b/components-diy/diy-category.vue index 9c26133..23077dd 100644 --- a/components-diy/diy-category.vue +++ b/components-diy/diy-category.vue @@ -122,7 +122,7 @@ { select: select == index }, { 'border-bottom': value.template == 4 && select + 1 === index }, { 'border-top': value.template == 4 && select - 1 === index }, - { 'first-category-item': index == 0 && value.template == 99 } + { 'first-category-item': index == 0 && (value.template == 99 || value.template == 1) } ]" @tap.stop="switchOneCategory(index)"> {{ item.category_name }} @@ -1613,10 +1613,31 @@ export default { padding: 0; } + // 穿透到子组件 diy-category-item: 模板1标题行定高, 与左侧第一个一级分类等高对齐 ::v-deep .category-title-with-lines { + height: 100rpx; + box-sizing: border-box; padding: 30rpx 0 20rpx; } + // 模板1: 左侧第一个一级分类定高, 与右侧标题行(如"离型纸 ----")垂直对齐 + .tree-wrap .category-item.first-category-item { + height: 100rpx; + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + white-space: nowrap; + overflow: hidden; + + view { + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + // 穿透修复: 图片不需要灰色背景框,与目标图保持一致 ::v-deep .img-box { background: transparent !important;