feat(admin): 分类管理弹窗列表加表头(2026-11-18 用户红框口径)——搜索行与分类列表之间加一行淡色列名「分类名称|商品数|操作」,与数据行同构对齐(同 gap/同左右内边距,商品数吃徽标同宽、操作同 margin-left:auto 靠右);只在列表有数据时渲染,空态/加载中不出;同组普通号只读口径行内无写按钮,操作列表头随之不渲染;表头在滚动列表外,翻页滚动固定。判据:vue-tsc rc0+jd-category-manage-dialog.mount 21/21 绿
This commit is contained in:
@@ -269,6 +269,14 @@ watch(totalPages, (pages) => {
|
||||
<LoadFailureBar v-if="loadFailure" :message="loadFailure" @retry="loadGroups" />
|
||||
<p v-if="errorText" class="group-error">{{ errorText }}</p>
|
||||
|
||||
<!-- 表头(2026-11-18 用户红框口径):列表有数据时在搜索行下列出三列名,与行同构对齐;
|
||||
只读口径下行没有改名/删除按钮,操作列表头随之不渲染。 -->
|
||||
<div v-if="filteredGroups.length" class="option-head">
|
||||
<span class="head-name">分类名称</span>
|
||||
<span class="head-count">商品数</span>
|
||||
<span v-if="editable" class="head-actions">操作</span>
|
||||
</div>
|
||||
|
||||
<ul class="option-list">
|
||||
<template v-if="filteredGroups.length">
|
||||
<li v-for="group in pagedGroups" :key="group.id" class="option-row">
|
||||
@@ -433,6 +441,33 @@ watch(totalPages, (pages) => {
|
||||
color: #a04432;
|
||||
font-size: 13px;
|
||||
}
|
||||
/* 表头与行同形(同 gap、同左右内边距),列名只是淡色小字不抢行内容;
|
||||
商品数列吃与徽标一致的 min-width/内边距,操作列同 rows 的 margin-left:auto 靠右。 */
|
||||
.option-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 6px 8px;
|
||||
border-bottom: 1px solid #e7eef5;
|
||||
font-size: 12px;
|
||||
color: #8293a5;
|
||||
}
|
||||
.head-name {
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
.head-count {
|
||||
flex: none;
|
||||
min-width: 22px;
|
||||
padding: 0 7px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.head-actions {
|
||||
flex: none;
|
||||
margin-left: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.option-list {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
|
||||
Reference in New Issue
Block a user