feat: 增加图片合并功能

This commit is contained in:
R524809
2026-09-09 15:31:05 +08:00
parent bab02e1efd
commit 2a38778fa3
57 changed files with 684 additions and 50 deletions
+187 -2
View File
@@ -28,7 +28,10 @@ button {
.sidebar-title { margin: 0; }
.reload-button,
.export-button {
.export-button,
.cart-button,
.cart-export-button,
.primary-button {
padding: 7px 13px;
border: 1px solid var(--line);
border-radius: 6px;
@@ -57,6 +60,186 @@ button {
.reload-button:hover { opacity: .88; transform: rotate(-45deg); }
.export-button:hover { color: var(--accent); border-color: var(--accent); }
/* ── 合并队列(购物车)────────────────────────────── */
.cart-button { font-size: 12px; }
.cart-button:hover { color: var(--accent); border-color: var(--accent); }
.cart-button[data-in-cart="true"] {
color: #fff;
background: var(--accent);
border-color: var(--accent);
}
.cart-bar[hidden] { display: none; }
.cart-bar {
position: fixed;
left: 50%;
bottom: 18px;
transform: translateX(-50%);
z-index: 20;
display: flex;
align-items: center;
gap: 10px;
max-width: min(1160px, calc(100vw - 32px));
padding: 9px 12px;
background: rgba(255, 255, 255, .97);
border: 1px solid var(--line);
border-radius: 12px;
box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.cart-label {
color: var(--muted);
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}
.cart-chips {
display: flex;
gap: 6px;
max-width: 44vw;
overflow-x: auto;
scrollbar-width: none;
}
.cart-chips::-webkit-scrollbar { display: none; }
.cart-chip {
display: flex;
align-items: center;
flex: 0 0 auto;
gap: 2px;
padding: 3px 4px 3px 10px;
background: var(--accent-soft);
border-radius: 6px;
}
.cart-chip-name {
max-width: 150px;
overflow: hidden;
color: var(--ink);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.cart-chip-button {
padding: 2px 4px;
border: 0;
border-radius: 4px;
background: transparent;
color: var(--muted);
font-size: 12px;
line-height: 1.4;
}
.cart-chip-button:hover:not(:disabled) { color: var(--accent); }
.cart-chip-button:disabled { opacity: .3; cursor: default; }
.cart-divider { width: 1px; height: 22px; background: var(--line); }
.cart-modes {
display: flex;
flex: 0 0 auto;
padding: 2px;
background: #f4f2ee;
border-radius: 6px;
}
.cart-mode-button {
padding: 4px 8px;
border: 0;
border-radius: 5px;
background: transparent;
color: var(--muted);
font-size: 12px;
white-space: nowrap;
}
.cart-mode-button[data-active="true"] {
color: var(--accent);
background: var(--surface);
box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.cart-export-button { color: #fff; background: var(--accent); border-color: var(--accent); white-space: nowrap; }
.cart-export-button:hover { opacity: .9; }
.cart-clear-button { padding: 7px 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cart-clear-button:hover { color: #a63f32; }
/* ── 合并预览弹窗 ────────────────────────────────── */
.modal-overlay {
position: fixed;
inset: 0;
z-index: 30;
display: grid;
place-items: center;
padding: 24px;
background: rgba(51, 51, 51, .45);
}
.modal {
display: flex;
flex-direction: column;
max-width: min(860px, 100%);
max-height: calc(100vh - 48px);
background: var(--surface);
border-radius: 12px;
overflow: hidden;
}
.modal-head {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid var(--line);
}
.modal-title { margin: 0; font-size: 14px; }
.modal-notice { color: #a67c2b; font-size: 12px; }
.modal-close {
margin-left: auto;
padding: 2px 8px;
border: 0;
background: transparent;
color: var(--muted);
font-size: 16px;
}
.modal-close:hover { color: var(--ink); }
.modal-body {
display: grid;
gap: 20px;
overflow-y: auto;
padding: 16px;
}
.preview-item {
display: grid;
gap: 10px;
justify-items: center;
}
.preview-canvas {
max-width: 100%;
height: auto;
border: 1px solid var(--line);
border-radius: 6px;
}
.modal-foot {
display: flex;
justify-content: flex-end;
gap: 10px;
padding: 12px 16px;
border-top: 1px solid var(--line);
}
.primary-button { color: #fff; background: var(--accent); border-color: var(--accent); }
.primary-button:hover { opacity: .9; }
.app-layout {
display: grid;
grid-template-columns: 184px minmax(0, 1fr) 184px;
@@ -235,7 +418,9 @@ button {
.tab-button { flex: 0 0 auto; }
.card { scroll-margin-top: 120px; }
.card-bar { align-items: flex-start; flex-wrap: wrap; }
.export-button { margin-left: auto; }
.cart-button { margin-left: auto; }
.cart-bar { left: 12px; right: 12px; transform: none; flex-wrap: wrap; }
.cart-chips { max-width: none; }
.chart { min-width: 560px; }
.card { overflow-x: auto; }
}