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

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

View File

@@ -714,14 +714,7 @@ body,
} }
.mobile-export-header { .mobile-export-header {
display: flex; padding-top: calc(12px + env(safe-area-inset-top, 0px));
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;
} }
.mobile-export-back { .mobile-export-back {
@@ -734,26 +727,13 @@ body,
border: none; border: none;
border-radius: 10px; border-radius: 10px;
background: transparent; background: transparent;
color: #334155; color: #e2e8f0;
cursor: pointer; cursor: pointer;
flex-shrink: 0; flex-shrink: 0;
} }
.mobile-export-back:active { .mobile-export-back:active {
background: #f1f5f9; background: rgba(255, 255, 255, 0.1);
}
.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;
} }
.mobile-export-steps { .mobile-export-steps {
@@ -1168,13 +1148,17 @@ body,
.mobile-template-actions { .mobile-template-actions {
width: 100%; width: 100%;
flex-wrap: nowrap;
gap: 10px;
} }
.mobile-template-actions .mobile-primary-btn { .mobile-template-actions .mobile-primary-btn {
width: 100%; flex: 1;
justify-content: center; min-width: 0;
min-height: 44px; }
font-size: 13px;
.mobile-template-actions .mobile-icon-btn:active {
transform: scale(0.97);
} }
.mobile-design-block { .mobile-design-block {