From 581811580c075c73308084c2a222405b8068498d Mon Sep 17 00:00:00 2001 From: mairuiming Date: Wed, 29 Oct 2025 19:58:02 +0800 Subject: [PATCH] 3 3 --- src/App.tsx | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 090d47d..4ded152 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2206,19 +2206,27 @@ export default function App() { if (!styleText && currentStyleText) styleText = currentStyleText; if (!colorText && currentColorText) colorText = currentColorText; - // 获取text2用于快照存档 - let text2 = currentText2 || ''; - if (!text2 && recordDetails.length > 0) { - const firstRecord = recordDetails[0]; - const text2FieldValue = firstRecord.fields['fldG6LZnmU']; - if (Array.isArray(text2FieldValue) && text2FieldValue.length > 0) { - const firstItem = text2FieldValue[0]; - text2 = typeof firstItem === 'string' ? firstItem : (firstItem?.text || firstItem?.name || ''); - } else if (typeof text2FieldValue === 'string') { - text2 = text2FieldValue; - } else if (text2FieldValue && typeof text2FieldValue === 'object') { - text2 = (text2FieldValue.text || text2FieldValue.name || ''); + // 获取text2用于快照存档:调整模式使用快照数据,生成模式保持为空 + let text2 = ''; + if (mode === 'adjust') { + // 调整模式:使用快照回填的数据 + text2 = currentText2 || ''; + if (!text2 && recordDetails.length > 0) { + const firstRecord = recordDetails[0]; + const text2FieldValue = firstRecord.fields['fldG6LZnmU']; + if (Array.isArray(text2FieldValue) && text2FieldValue.length > 0) { + const firstItem = text2FieldValue[0]; + text2 = typeof firstItem === 'string' ? firstItem : (firstItem?.text || firstItem?.name || ''); + } else if (typeof text2FieldValue === 'string') { + text2 = text2FieldValue; + } else if (text2FieldValue && typeof text2FieldValue === 'object') { + text2 = (text2FieldValue.text || text2FieldValue.name || ''); + } } + } else { + // 生成模式:text2字段保持为空,不使用缓存数据 + text2 = ''; + console.log('生成模式:快照中text2字段保持为空'); } const pageSnapshot = {