diff --git a/src/components/DataImporter.tsx b/src/components/DataImporter.tsx index 4e1e31b..b1baf9d 100644 --- a/src/components/DataImporter.tsx +++ b/src/components/DataImporter.tsx @@ -64,6 +64,8 @@ interface DataImporterProps { templateName: string; templateVariables: string[]; variant?: 'default' | 'ps' | 'mobile'; + /** 由外部提供下载入口时隐藏内置按钮 */ + hideDownloadTemplate?: boolean; } export const DataImporter: React.FC = ({ @@ -73,6 +75,7 @@ export const DataImporter: React.FC = ({ templateName, templateVariables, variant = 'default', + hideDownloadTemplate = false, }) => { const { showAlert } = useAppDialog(); const isPs = variant === 'ps'; @@ -184,21 +187,21 @@ export const DataImporter: React.FC = ({ return (
- {!isMobile && ( -
+ {!isMobile && !hideDownloadTemplate && ( +
)} diff --git a/src/components/MobileExportView.tsx b/src/components/MobileExportView.tsx index a6ba197..02fdf66 100644 --- a/src/components/MobileExportView.tsx +++ b/src/components/MobileExportView.tsx @@ -29,9 +29,9 @@ const MOBILE_EXPORT_MODULES: { label: string; icon: React.ReactNode; }[] = [ - { id: 'data', label: '数据源', icon: }, - { id: 'layout', label: '排版', icon: }, -]; + { id: 'data', label: '数据源', icon: }, + { id: 'layout', label: '排版', icon: }, + ]; interface MobileExportViewProps { template: LabelTemplate; @@ -141,11 +141,10 @@ export const MobileExportView: React.FC = ({ type="button" onClick={onExportPdf} disabled={exportDisabled} - className={`inline-flex items-center gap-1 ml-1 px-2.5 py-1.5 text-[11px] font-semibold rounded-lg shrink-0 ${ - exportDisabled + className={`inline-flex items-center gap-1 ml-1 px-2.5 py-1.5 text-[11px] font-semibold rounded-lg shrink-0 ${exportDisabled ? 'bg-[#444] text-[#888] cursor-not-allowed' : 'bg-indigo-600 hover:bg-indigo-700 active:bg-indigo-800 text-white' - }`} + }`} > {pdfGenerating ? ( @@ -186,9 +185,8 @@ export const MobileExportView: React.FC = ({ key={item.id} type="button" onClick={() => setMobileModule(item.id)} - className={`mobile-design-props-nav-btn mobile-export-props-nav-btn ${ - mobileModule === item.id ? 'active' : '' - }`} + className={`mobile-design-props-nav-btn mobile-export-props-nav-btn ${mobileModule === item.id ? 'active' : '' + }`} > {item.icon} {item.label} @@ -216,6 +214,7 @@ export const MobileExportView: React.FC = ({
= ({ /> )} - {exportBlockedReason && !pdfGenerating && ( + {/* {exportBlockedReason && !pdfGenerating && (

{exportBlockedReason}

- )} + )} */}
)} {mobileModule === 'layout' && ( diff --git a/src/components/PreviewGrid.tsx b/src/components/PreviewGrid.tsx index 7e547c8..25416cf 100644 --- a/src/components/PreviewGrid.tsx +++ b/src/components/PreviewGrid.tsx @@ -577,8 +577,8 @@ export const LayoutPreview: React.FC = ({

上传数据源并完成变量映射后

{isMobileVariant - ? '在下方「数据源与变量绑定」中上传 Excel,预览将自动更新' - : '在右侧「数据源与变量绑定」中点击「应用数据」生成排版预览;纸张排版变更会自动更新'} + ? '在下方「数据源」中上传 Excel,预览将自动更新' + : '在右侧「数据源」中点击「应用数据」生成排版预览;纸张排版变更会自动更新'}

) : (