import React, { useState } from 'react'; import { ChevronDown, Settings } from 'lucide-react'; import { CutLineConfig, ExportRangeConfig, LabelTemplate, PaperConfig, RecordRow, } from '../types'; import { PaperSettingsPanel, PageInput } from './PreviewGrid'; interface MobileExportPropsPanelProps { template: LabelTemplate; paper: PaperConfig; onChangePaper: (paper: PaperConfig) => void; rows: RecordRow[]; exportRange: ExportRangeConfig; cutLine: CutLineConfig; onChangeCutLine: (cutLine: CutLineConfig) => void; locked?: boolean; } export const MobileExportPropsPanel: React.FC = ({ template, paper, onChangePaper, rows, exportRange, cutLine, onChangeCutLine, locked = false, }) => { const [open, setOpen] = useState(false); if (locked) return null; const paperLabel = paper.type === 'custom' ? `${paper.width}×${paper.height} mm` : paper.type; const summary = `${paperLabel} · ${paper.orientation === 'portrait' ? '纵向' : '横向'}${ cutLine.enabled ? ' · 裁切线' : '' }`; return (
{open && (

裁切参考线

onChangeCutLine({ ...cutLine, width: Math.max(0.02, Math.min(2, Number(val) || 0.1)), }) } inputClassName="mobile-field font-mono" />
onChangeCutLine({ ...cutLine, color: e.target.value })} className="color-input shrink-0" aria-label="裁切线颜色" /> onChangeCutLine({ ...cutLine, color: e.target.value })} className="mobile-field font-mono flex-1 min-w-0" />
)}
); };