Files
crawler-plugin/admin-frontend-vue/src/pages/jd/jd-database-page.css
T

403 lines
11 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 像素复刻「外观专利数据库」页样式(panel-box + 自绘表格 + 旧式分页);列表只摆部分字段,全量属性在详情抽屉。 */
.jd-database-view {
font-family: inherit;
color: var(--c-text, #24384d);
display: flex;
flex-direction: column;
gap: 18px;
}
.panel-box {
width: 100%;
min-width: 0;
padding: 20px 22px 24px;
border: 1px solid #d8e3ee;
border-radius: 14px;
background: linear-gradient(145deg, #ffffff, #f9fbfd);
box-shadow: 0 1px 2px rgba(39, 67, 94, 0.04), 0 14px 30px -24px rgba(39, 67, 94, 0.28);
}
h3 {
margin: 0 0 16px;
font-size: 15px;
font-weight: 650;
color: #24384d;
letter-spacing: 0.2px;
}
.jd-panel-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
.jd-panel-head h3 {
margin: 0;
}
.jd-filter-row {
/* 可换行流式布局:固定 6 列 minmax(140px) 的网格在窄面板下最小宽超出容器,
把查询/重置挤出面板右缘(与「管理分组」重叠)。flex-wrap 让放不下的项自然折行。 */
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: flex-end;
margin-bottom: 16px;
}
.jd-filter-row .form-group {
flex: 1 1 160px;
min-width: 150px;
max-width: 260px;
}
.jd-filter-actions {
display: flex;
gap: 10px;
align-items: center;
white-space: nowrap;
}
.form-group {
display: flex;
flex-direction: column;
gap: 7px;
margin-bottom: 0;
}
.form-group label {
color: #5b6f83;
font-size: 12.5px;
font-weight: 600;
}
.form-group input,
.form-group select {
min-width: 0;
min-height: 42px;
padding: 8px 12px;
border: 1px solid #cbd9e6;
border-radius: 9px;
background: #f8fbfd;
color: #24384d;
font-size: 13.5px;
font-family: inherit;
color-scheme: light;
outline: none;
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.form-group input:hover,
.form-group select:hover {
border-color: #9fb7cd;
}
.form-group input:focus,
.form-group select:focus {
background: #ffffff;
border-color: #5f85ad;
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
}
.form-group input[type="date"] {
color-scheme: light;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 42px;
padding: 9px 18px;
border: 1px solid #4f78a5;
border-radius: 9px;
background: linear-gradient(135deg, #5f85ad, #4f78a5);
color: #ffffff;
font-family: inherit;
font-size: 13.5px;
cursor: pointer;
box-shadow: 0 8px 18px -14px rgba(79, 120, 165, 0.72);
transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
.btn:hover:not(:disabled) {
background: linear-gradient(135deg, #7094ba, #5d83ac);
box-shadow: 0 11px 22px -14px rgba(79, 120, 165, 0.8);
}
.btn:disabled {
cursor: not-allowed;
opacity: 0.55;
}
.btn-secondary {
background: #ffffff;
color: #5b6f83;
border-color: #c7d7e5;
}
.btn-secondary:hover:not(:disabled) {
color: #2f5d8b;
border-color: #95b1cb;
background: #edf5fb;
}
.jd-toolbar {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
/* 工具栏里的下拉与按钮统一 42px 外壳(2026-11-16 用户口径「样式要统一」):
这一行此前只有 .btn 有壳,原生 <select> 落成 28px 灰框、字号也不跟,
与旁边按钮同排时高矮不齐(分组下拉同日上移进筛选行,本行只剩分类筛选一颗)。
数值与 .form-group select / .btn 同一套(42px 高、
9px 圆角、#cbd9e6 描边、#f8fbfd 底),箭头用内联 SVG 自绘,避免各浏览器原生
箭头粗细不一(appearance:none 后必须补 padding-right 给箭头留位)。 */
.jd-toolbar select {
min-height: 42px;
max-width: 220px;
padding: 0 34px 0 12px;
border: 1px solid #cbd9e6;
border-radius: 9px;
background-color: #f8fbfd;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235b6f83' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
appearance: none;
-webkit-appearance: none;
color: #24384d;
font-family: inherit;
font-size: 13.5px;
cursor: pointer;
outline: none;
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.jd-toolbar select:hover {
border-color: #9fb7cd;
}
.jd-toolbar select:focus {
background-color: #ffffff;
border-color: #5f85ad;
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
}
/* 危险动作(删除勾选)推到行尾:留在「批量编辑分类/分类筛选」旁边会被读成同一组动作。 */
.jd-delete-btn {
margin-left: auto;
}
/* 分类管理(2026-11-17 独立分类管理页并入本页的对话框入口):贴着分类筛选下拉。 */
.jd-manage-btn {
margin-left: 6px;
}
/* 危险动作(删除勾选):与全站 .btn-danger 同形——实心红渐变+白字。
旧版是白底红字描边,落在工具栏里看着像「未激活的次要按钮」,与打卡/分组等页不统一。 */
.btn-danger {
background: linear-gradient(135deg, #c06d77, #b35f6a);
border-color: #b35f6a;
color: #ffffff;
}
.btn-danger:hover:not(:disabled) {
background: linear-gradient(135deg, #cb7c84, #b96570);
}
.jd-summary {
color: #5b6f83;
font-size: 13px;
white-space: nowrap;
}
/* 非超管只读提示(2026-11-16 写权限收窄):紧跟汇总的一句话,不冒充可点按钮。 */
.jd-readonly-tip {
color: #8293a5;
font-size: 12.5px;
white-space: nowrap;
}
/* 只有一个可见分组时锁定的组名(不可切):筛选行「分组」标签下的静态芯片(2026-11-16 用户口径
「做成分组」把下拉从工具栏上移进筛选行后跟着搬),与同排 select 同高同壳(42px/9px 圆角),
"一组锁定"和"多组下拉"两种形态占位一致;组名超宽省略号收口,不把筛选行撑破。 */
.jd-group-locked {
display: flex;
align-items: center;
min-height: 42px;
padding: 0 12px;
border: 1px solid #dbe5ee;
border-radius: 9px;
background: #f1f6fb;
color: #4e6479;
font-size: 13.5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.table-scroll {
width: 100%;
min-width: 0;
overflow-x: auto;
border: 1px solid #dbe5ee;
border-radius: 10px;
background: #ffffff;
}
.table-scroll table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
/* 列宽收口(2026-11-16 用户口径「列表间距有点大」):1500px 的 min-width 让宽屏下
唯一的弹性列(商品信息)独吞剩余宽度,标题右侧留出近 800px 空白,价格/库存被推到最右。
商品信息改固定 520px 后各列按比例分摊余量,min-width 降到 1180px 即可无横向滚动。 */
.jd-table-scroll > table {
min-width: 1180px;
}
/* 操作列(编辑/删除):双小按钮需 138px(ops-cell-must-wrap 实测口径:两字按钮 53×2+24 padding)。
overflow 显式放开:td 全局是 overflow:hidden(611 行),压线时第二颗(删除)会被裁成
「编辑+…」的形状——2026-11-16 用户报「删除没了」的真因,列宽 120px < 实测 138px。 */
.jd-ops-cell {
white-space: nowrap;
text-overflow: clip;
overflow: visible;
}
.btn-sm {
min-height: 28px;
padding: 3px 10px;
font-size: 12.5px;
margin-right: 6px;
}
.btn-sm:last-child {
margin-right: 0;
}
.table-scroll th,
.table-scroll td {
/* 单元格左右内距 12→10px(同上「间距有点大」):列与列之间少 4px,行内更紧凑。 */
padding: 10px 10px;
text-align: left;
font-size: 13.5px;
line-height: 1.5;
border-bottom: 1px solid #e0e8ef;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 首列勾选格:checkbox 的 UA 默认 margin(3px 3px 3px 4px)使其 margin-box 溢出
42px 格的内容盒(42−24 padding=18px),配合上面的 overflow:hidden,Chromium 在
首次渲染时会把被裁的 checkbox 碎片留在裁剪边缘,看起来像格子右边多出 ".."。
margin 归零后 margin-box 收进内容盒,首渲染即干净(playwright 三次冷加载已验)。 */
.table-scroll th:first-child input,
.table-scroll td:first-child input {
margin: 0;
}
.table-scroll th {
background: #edf4fa;
color: #4e6479;
border-bottom-color: #d5e1eb;
font-size: 12.5px;
font-weight: 600;
letter-spacing: 0.4px;
}
.table-scroll tbody tr:hover td {
background: #f1f7fb;
}
.table-scroll tbody tr:last-child td {
border-bottom: 0;
}
/* 点行开详情抽屉:行级 hover 已有底色反馈,光标再点一下提示可点。 */
.jd-row {
cursor: pointer;
}
.jd-thumb {
display: block;
width: 48px;
height: 48px;
object-fit: cover;
border: 1px solid #d8e3ee;
border-radius: 6px;
background: #f2f7fb;
}
/* 商品信息列=京麦同款合并布局:td 的全局 nowrap/ellipsis 与多行内容冲突,本列放开换行,
截断交给内部各行(标题两行 line-clamp、编码/货号单行 ellipsis)。 */
.jd-info-cell {
white-space: normal;
text-overflow: clip;
}
.jd-info-wrap {
display: flex;
align-items: flex-start;
gap: 10px;
min-width: 0;
}
.jd-info-figure {
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
flex-shrink: 0;
}
.jd-thumb-empty {
display: flex;
align-items: center;
justify-content: center;
color: #8293a5;
font-size: 12px;
}
.jd-health {
color: #2e9e6b;
font-size: 11px;
line-height: 1.2;
white-space: nowrap;
}
.jd-info-body {
min-width: 0;
display: flex;
flex-direction: column;
gap: 3px;
}
.jd-info-title {
color: #24384d;
font-size: 13.5px;
font-weight: 500;
line-height: 1.45;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-all;
}
.jd-info-meta {
display: flex;
align-items: center;
gap: 4px;
color: #7b8a99;
font-size: 12px;
line-height: 1.4;
white-space: nowrap;
overflow: hidden;
}
.jd-info-code {
font-family: "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;
color: #4e6479;
overflow: hidden;
text-overflow: ellipsis;
}
.jd-copy-btn {
flex-shrink: 0;
border: 0;
background: transparent;
color: #8aa5bf;
font-size: 12px;
cursor: pointer;
padding: 0 2px;
line-height: 1;
}
.jd-copy-btn:hover {
color: #3b82c4;
}
.jd-info-tags {
display: flex;
gap: 6px;
margin-top: 2px;
}
/* 品牌·类目行(京麦列表同款深色文字):信息 meta 是灰色,这行按京麦用主文字色。 */
.jd-brand-cat {
color: #3d5368;
font-weight: 550;
}
.jd-tag {
display: inline-flex;
align-items: center;
height: 18px;
padding: 0 6px;
border: 1px solid #cfe3f5;
border-radius: 3px;
background: #eef5fc;
color: #3b82c4;
font-size: 11.5px;
white-space: nowrap;
}
.empty-tip {
padding: 44px 24px;
text-align: center;
color: #8293a5;
font-size: 13.5px;
}