diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 2c6e2fc..3ecade6 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -541,7 +541,10 @@ export default { // PR-FRONTEND-MEDIA-UPLOAD-FIX (2026-09-16): pendingImages 数组支持 1-9 张图 // 原 pendingImage 单数对象, 只存第一张, 选 5 张只发 1 张 // 每项: { localId, tempPath, uploading, uploaded, uploadError, sentWithBatch } - _pendingIdSeq: 0, + // ⚠️ Vue 2 会过滤掉 _/$ 开头的数据属性, _pendingIdSeq → undefined → ++undefined = NaN + // 所有图 localId 都变 NaN, Vue "Duplicate keys" 警告, 数组错乱. + // 必须用非下划线前缀. PR-FRONTEND-MEDIA-UPLOAD-FIX-HOTFIX (2026-09-16) + pendingIdSeq: 0, pendingImages: [], scrollTop: 0, scrollIntoViewId: null, @@ -770,7 +773,7 @@ export default { const list = Array.isArray(paths) ? paths : (paths ? [paths] : []) if (!list.length) return list.forEach((path) => { - const localId = ++this._pendingIdSeq + const localId = ++this.pendingIdSeq const pending = { localId, tempPath: path,