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 (!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 = {