优化移动导出视图的样式和功能,替换下载图标为打印图标,并调整标题和按钮的布局与样式。

This commit is contained in:
iqudoo
2026-06-12 22:02:50 +08:00
parent 66605b51db
commit bc94c1d830
2 changed files with 35 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import {
ChevronLeft,
FileDown,
Printer,
Loader2,
Database,
Link2,
@@ -85,21 +85,26 @@ export const MobileExportView: React.FC<MobileExportViewProps> = ({
return (
<div className="mobile-export-view">
<header className="mobile-export-header">
<button type="button" onClick={onBack} className="mobile-export-back" aria-label="返回">
<ChevronLeft className="w-5 h-5" />
</button>
<div className="mobile-export-header-text min-w-0 flex-1">
<p className="mobile-export-title truncate">{templateName}</p>
<p className="mobile-export-subtitle">
{template.width}×{template.height} mm
{hasData && selectedCount > 0 && (
<span>
{' '}
· {selectedCount} · {totalPages}
</span>
)}
</p>
<header className="no-print bg-slate-950 border-b border-slate-900 shrink-0 shadow mobile-export-header mobile-template-header px-4 py-3">
<div className="flex items-center gap-2 min-w-0 w-full">
<button
type="button"
onClick={onBack}
className="mobile-export-back"
aria-label="返回"
>
<ChevronLeft className="w-5 h-5" />
</button>
<div className="flex items-center gap-3 min-w-0 flex-1">
<div className="min-w-0">
{/* <h1 className="text-sm font-bold tracking-wider flex items-center gap-2 text-slate-100 uppercase">
<span className="truncate">批量标签排版印刷生成器</span>
</h1> */}
<p className="text-sm font-bold tracking-wider flex items-center gap-2 text-slate-100 uppercase" title={templateName}>
{templateName}
</p>
</div>
</div>
</div>
</header>
@@ -201,10 +206,10 @@ export const MobileExportView: React.FC<MobileExportViewProps> = ({
</>
) : (
<>
<FileDown className="w-5 h-5 shrink-0" />
<Printer className="w-5 h-5 shrink-0" />
{exportBlockedReason
? '生成 PDF'
: `生成 PDF${selectedCount} 枚 · ${totalPages} 页)`}
? '生成标签PDF文件'
: `生成标签PDF文件${selectedCount} 枚 · ${totalPages} 页)`}
</>
)}
</button>

View File

@@ -714,14 +714,7 @@ body,
}
.mobile-export-header {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px;
padding-top: calc(10px + env(safe-area-inset-top, 0px));
background: #fff;
border-bottom: 1px solid #e2e8f0;
flex-shrink: 0;
padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.mobile-export-back {
@@ -734,26 +727,13 @@ body,
border: none;
border-radius: 10px;
background: transparent;
color: #334155;
color: #e2e8f0;
cursor: pointer;
flex-shrink: 0;
}
.mobile-export-back:active {
background: #f1f5f9;
}
.mobile-export-title {
font-size: 15px;
font-weight: 700;
color: #0f172a;
line-height: 1.2;
}
.mobile-export-subtitle {
font-size: 12px;
color: #64748b;
margin-top: 2px;
background: rgba(255, 255, 255, 0.1);
}
.mobile-export-steps {
@@ -1168,13 +1148,17 @@ body,
.mobile-template-actions {
width: 100%;
flex-wrap: nowrap;
gap: 10px;
}
.mobile-template-actions .mobile-primary-btn {
width: 100%;
justify-content: center;
min-height: 44px;
font-size: 13px;
flex: 1;
min-width: 0;
}
.mobile-template-actions .mobile-icon-btn:active {
transform: scale(0.97);
}
.mobile-design-block {