3
This commit is contained in:
2025-10-29 19:58:02 +08:00
parent d779aae3a7
commit 581811580c

View File

@ -2206,19 +2206,27 @@ export default function App() {
if (!styleText && currentStyleText) styleText = currentStyleText; if (!styleText && currentStyleText) styleText = currentStyleText;
if (!colorText && currentColorText) colorText = currentColorText; if (!colorText && currentColorText) colorText = currentColorText;
// 获取text2用于快照存档 // 获取text2用于快照存档调整模式使用快照数据生成模式保持为空
let text2 = currentText2 || ''; let text2 = '';
if (!text2 && recordDetails.length > 0) { if (mode === 'adjust') {
const firstRecord = recordDetails[0]; // 调整模式:使用快照回填的数据
const text2FieldValue = firstRecord.fields['fldG6LZnmU']; text2 = currentText2 || '';
if (Array.isArray(text2FieldValue) && text2FieldValue.length > 0) { if (!text2 && recordDetails.length > 0) {
const firstItem = text2FieldValue[0]; const firstRecord = recordDetails[0];
text2 = typeof firstItem === 'string' ? firstItem : (firstItem?.text || firstItem?.name || ''); const text2FieldValue = firstRecord.fields['fldG6LZnmU'];
} else if (typeof text2FieldValue === 'string') { if (Array.isArray(text2FieldValue) && text2FieldValue.length > 0) {
text2 = text2FieldValue; const firstItem = text2FieldValue[0];
} else if (text2FieldValue && typeof text2FieldValue === 'object') { text2 = typeof firstItem === 'string' ? firstItem : (firstItem?.text || firstItem?.name || '');
text2 = (text2FieldValue.text || text2FieldValue.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 = { const pageSnapshot = {