From 104afa38448b549c2d34542bc7be58a7599f7a5f Mon Sep 17 00:00:00 2001 From: caohuipeng Date: Sat, 12 Sep 2026 22:52:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E4=BF=AE=E5=A4=8D=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E7=BC=96=E8=BE=91=E5=99=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正 XFA 布局候选项的非空类型推断 - 修复 reactive 解包后的 editEpoch 访问方式 --- .../OrderProfileEditorPage.vue | 4 ++-- .../composables/useOrderProfileValueAdapter.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/admin/modules/shipping-order-document-profiles/OrderProfileEditorPage.vue b/frontend/src/features/admin/modules/shipping-order-document-profiles/OrderProfileEditorPage.vue index 6f3e0d06..55efb327 100644 --- a/frontend/src/features/admin/modules/shipping-order-document-profiles/OrderProfileEditorPage.vue +++ b/frontend/src/features/admin/modules/shipping-order-document-profiles/OrderProfileEditorPage.vue @@ -1973,7 +1973,7 @@ const save = async (automatic = false) => { saving.value = true; saveState.value = 'saving'; const savingChangeVersion = localChangeVersion; - const xfaEpochAtStart = hasValueSourceMapping.value ? valueAdapterDesk.editEpoch.value : 0; + const xfaEpochAtStart = hasValueSourceMapping.value ? valueAdapterDesk.editEpoch : 0; let saveSucceeded = false; let shouldRescheduleAutosave = false; try { @@ -2013,7 +2013,7 @@ const save = async (automatic = false) => { // [STEP] PUT 成功即解锁「保存中」;applySavedDraft 不得继续占住保存态。 // 若保存飞行中用户又选了数据源,先抓本地快照,避免随后被服务端旧草稿冲掉。 const concurrentXfaEdit = hasValueSourceMapping.value - && valueAdapterDesk.editEpoch.value !== xfaEpochAtStart + && valueAdapterDesk.editEpoch !== xfaEpochAtStart ? valueAdapterDesk.captureConcurrentEditState() : null; saving.value = false; diff --git a/frontend/src/features/admin/modules/shipping-order-document-profiles/composables/useOrderProfileValueAdapter.ts b/frontend/src/features/admin/modules/shipping-order-document-profiles/composables/useOrderProfileValueAdapter.ts index 29ca5b6a..0e2fbb18 100644 --- a/frontend/src/features/admin/modules/shipping-order-document-profiles/composables/useOrderProfileValueAdapter.ts +++ b/frontend/src/features/admin/modules/shipping-order-document-profiles/composables/useOrderProfileValueAdapter.ts @@ -926,7 +926,7 @@ export function useOrderProfileValueAdapter(options: UseOrderProfileValueAdapter remappedBindings.push(binding); continue; } - const nextLayoutId = String(candidates[0].layout_id); + const nextLayoutId = String(candidates[0]!.layout_id); didRemapOrphanLayouts = true; remappedBindings.push({ ...binding, field_layout_id: nextLayoutId }); }