diff --git a/src/components/LabelDesigner.tsx b/src/components/LabelDesigner.tsx index 1cecfd8..e6e5d39 100644 --- a/src/components/LabelDesigner.tsx +++ b/src/components/LabelDesigner.tsx @@ -229,6 +229,13 @@ export const LabelDesigner: React.FC = ({ [template.variableDefaults] ); + const showReferencePreview = useMemo( + () => + !!template.previewReferenceBackground && + template.enablePreviewReferenceBackground !== false, + [template.previewReferenceBackground, template.enablePreviewReferenceBackground] + ); + const localElementsRef = useRef(null); /** 交互开始时的元素快照:拖动底图分层、缩放节流重绘 */ const [interactionSnapshot, setInteractionSnapshot] = useState( @@ -1654,10 +1661,10 @@ export const LabelDesigner: React.FC = ({
- {template.previewReferenceBackground && ( + {showReferencePreview && ( = ({ rowData={null} rowIndex={0} showBorder={false} - transparentBackground={!!template.previewReferenceBackground} + transparentBackground={showReferencePreview} variableDefaults={previewDefaults} renderScale={canvasRenderScale} /> diff --git a/src/components/PropSidebar.tsx b/src/components/PropSidebar.tsx index 3ad41f2..37a7a4d 100644 --- a/src/components/PropSidebar.tsx +++ b/src/components/PropSidebar.tsx @@ -858,7 +858,7 @@ export const PropSidebar: React.FC = ({ 预览参考背景

- 上传底图作为设计参考,便于对照条件显示的背景元素;默认仅设计画布可见,可按需开启生成与打印输出。 + 上传底图作为设计参考;可分别控制设计预览与生成/打印输出是否显示。

+