feat(jd-database): v1.7 前端骨架——合并搜索+筛选弹层+回显条+自绘分页条+已选条
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
/* 京东数据库页样式(v1.6 蓝图 Phase 5 重写装配):顶部通栏(筛选行+工具栏)+横排体
|
||||
(左侧栏类目树/分类平铺+主面板:卡片网格+旧式分页)。旧自绘表格样式随操作列/表格
|
||||
退役整体摘除;列表字段映射收进 JdProductCard scoped 样式,本文件只管页面装配层。
|
||||
/* 京东数据库页样式(v1.6 蓝图 Phase 5 重写装配 → v1.7 对齐原型):顶部通栏(搜索行+
|
||||
工具栏)+横排体(左侧栏类目树/分类平铺+主面板:回显条+卡片网格+分页条+已选条)。
|
||||
旧自绘表格样式随操作列/表格退役整体摘除;列表字段映射收进 JdProductCard scoped 样式,
|
||||
本文件只管页面装配层。
|
||||
2026-11-21 用户口径四件:①面板删标题行(筛选往上摆,原型顶栏直接开始);
|
||||
②筛选行收窄字段宽让归属三档并入一行;③左右高度对齐——stretch 让侧栏随主面板拉满;
|
||||
④「放到上面筛选框」红框整体上移——筛选行+批量按钮条离开主面板、提到页面最顶
|
||||
(提示条正下方、通栏整行),外层改纵向排:顶部通栏在上,侧栏+主面板横排在下。 */
|
||||
(提示条正下方、通栏整行),外层改纵向排:顶部通栏在上,侧栏+主面板横排在下。
|
||||
v1.7(同日对齐原型《商品数据商城》)追加五件:合并搜索框(× 清除)、筛选按钮下方
|
||||
absolute 浮层(价格区间+同步起止+重置/应用)、筛选回显条(条件芯片+共 N 条+
|
||||
清除筛选)、自绘顶部分页条(OldPagination 从本页撤下)、底部已选条(sticky 悬浮)。 */
|
||||
.jd-database-view {
|
||||
font-family: inherit;
|
||||
color: var(--c-text, #24384d);
|
||||
@@ -43,8 +47,8 @@
|
||||
min-width: 0;
|
||||
}
|
||||
.jd-filter-row {
|
||||
/* 可换行流式布局:固定网格在窄面板下最小宽超出容器,把查询/重置挤出面板右缘。
|
||||
flex-wrap 让放不下的项自然折行。 */
|
||||
/* 可换行流式布局:固定网格在窄面板下最小宽超出容器,把尾部的归属下拉挤出面板右缘。
|
||||
flex-wrap 让放不下的项自然折行。v1.7 起内容=搜索框+筛选弹层锚点+分组+归属三档。 */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
@@ -52,18 +56,238 @@
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.jd-filter-row .form-group {
|
||||
/* 收窄字段宽(2026-11-21「这些可以往上摆」):min 132×5+归属下拉 150+查询/重置
|
||||
在常规面板宽(≥1130px)下一行放得下,不再让「未分类」单独折一行。 */
|
||||
flex: 1 1 132px;
|
||||
min-width: 132px;
|
||||
/* 「分组」表单组(label+下拉/锁定芯片):固定宽不再吃 flex(搜索框独占主弹性,
|
||||
分组收窄到内容宽)。 */
|
||||
flex: 0 1 auto;
|
||||
min-width: 150px;
|
||||
max-width: 220px;
|
||||
}
|
||||
.jd-filter-actions {
|
||||
/* 合并搜索框(v1.7 对齐原型):吃掉搜索行的主弹性;relative 壳给 × 清除按钮定位。 */
|
||||
.jd-search-wrap {
|
||||
position: relative;
|
||||
flex: 1 1 260px;
|
||||
min-width: 220px;
|
||||
max-width: 420px;
|
||||
}
|
||||
.jd-search-input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 42px;
|
||||
padding: 8px 34px 8px 12px;
|
||||
border: 1px solid #cbd9e6;
|
||||
border-radius: 9px;
|
||||
background: #f8fbfd;
|
||||
color: #24384d;
|
||||
font-size: 13.5px;
|
||||
font-family: inherit;
|
||||
outline: none;
|
||||
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
|
||||
}
|
||||
.jd-search-input:hover {
|
||||
border-color: #9fb7cd;
|
||||
}
|
||||
.jd-search-input:focus {
|
||||
background: #ffffff;
|
||||
border-color: #5f85ad;
|
||||
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||||
}
|
||||
.jd-search-clear {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: #dbe7f1;
|
||||
color: #5b6f83;
|
||||
font-size: 15px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: background 120ms ease, color 120ms ease;
|
||||
}
|
||||
.jd-search-clear:hover {
|
||||
background: #c7d9e8;
|
||||
color: #2f5d8b;
|
||||
}
|
||||
/* 筛选弹层锚点:relative 给浮层「按钮下方 absolute」定位(v1.7 对齐原型)。 */
|
||||
.jd-filter-anchor {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
/* 筛选按钮激活态(弹层开着时描一圈主色,提示当前条件挂在它下面)。 */
|
||||
.jd-filter-anchor .jd-filter-open {
|
||||
border-color: #5f85ad;
|
||||
color: #2f5d8b;
|
||||
background: #edf5fb;
|
||||
}
|
||||
.jd-filter-popover {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
left: 0;
|
||||
z-index: 30;
|
||||
width: 300px;
|
||||
padding: 14px;
|
||||
border: 1px solid #d8e3ee;
|
||||
border-radius: 12px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 18px 42px -22px rgba(39, 67, 94, 0.45);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
.jd-pop-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.jd-pop-row > label {
|
||||
color: #5b6f83;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.jd-pop-fields {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.jd-pop-fields input {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
min-height: 36px;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid #cbd9e6;
|
||||
border-radius: 8px;
|
||||
background: #f8fbfd;
|
||||
color: #24384d;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
color-scheme: light;
|
||||
outline: none;
|
||||
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
|
||||
}
|
||||
.jd-pop-fields input:focus {
|
||||
background: #ffffff;
|
||||
border-color: #5f85ad;
|
||||
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||||
}
|
||||
.jd-pop-sep {
|
||||
color: #8293a5;
|
||||
font-size: 12.5px;
|
||||
}
|
||||
.jd-pop-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
.jd-pop-actions .btn {
|
||||
min-height: 34px;
|
||||
padding: 5px 14px;
|
||||
}
|
||||
/* 筛选回显条(v1.7 F5):条件芯片+共 N 条+清除筛选;无激活筛选不渲染(v-if 在模板)。 */
|
||||
.jd-filter-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #e3ecf4;
|
||||
border-radius: 9px;
|
||||
background: #f6fafd;
|
||||
}
|
||||
.jd-chip {
|
||||
padding: 3px 10px;
|
||||
border-radius: 999px;
|
||||
background: #e8f1f9;
|
||||
color: #3d5a77;
|
||||
font-size: 12.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.jd-chip-total {
|
||||
color: #5b6f83;
|
||||
font-size: 12.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.jd-chip-clear {
|
||||
margin-left: auto;
|
||||
padding: 2px 6px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: #4f78a5;
|
||||
font-size: 12.5px;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.jd-chip-clear:hover {
|
||||
color: #2f5d8b;
|
||||
}
|
||||
/* 顶部分页条(v1.7 F4):页码信息+五键+档位下拉;OldPagination 从本页撤下后的替身。 */
|
||||
.jd-page-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.jd-page-info {
|
||||
color: #5b6f83;
|
||||
font-size: 13px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.jd-page-btns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.jd-page-btn {
|
||||
min-height: 32px;
|
||||
padding: 4px 12px;
|
||||
border: 1px solid #c7d7e5;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
color: #5b6f83;
|
||||
font-size: 12.5px;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
|
||||
}
|
||||
.jd-page-btn:hover:not(:disabled) {
|
||||
background: #edf5fb;
|
||||
color: #2f5d8b;
|
||||
border-color: #95b1cb;
|
||||
}
|
||||
.jd-page-btn:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.5;
|
||||
}
|
||||
/* 档位下拉:42px 外壳由全局 .el-select.admin-filter 皮肤出——这里只补宽度与左侧外距。
|
||||
.page-size-select 定位类保留(旧分页条的定位约定,测试与人工定位都认它)。 */
|
||||
.jd-page-bar > .el-select.admin-filter,
|
||||
.jd-page-bar > .page-size-select {
|
||||
width: 120px;
|
||||
margin-left: auto;
|
||||
}
|
||||
/* 底部已选条(v1.7 F7 骨架):主面板底部 sticky 悬浮,滚动到列表深处也看得见勾选规模。 */
|
||||
.jd-select-bar {
|
||||
position: sticky;
|
||||
bottom: 8px;
|
||||
z-index: 10;
|
||||
margin-top: 12px;
|
||||
padding: 9px 16px;
|
||||
border: 1px solid #cfdff0;
|
||||
border-radius: 10px;
|
||||
background: #eef6fd;
|
||||
color: #2f5d8b;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 -6px 18px -14px rgba(39, 67, 94, 0.5);
|
||||
}
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user