From 7305d46328b9c8ada6eb5f919daec0715646460e Mon Sep 17 00:00:00 2001 From: Stardust <1441308506a@gmail.com> Date: Tue, 24 Mar 2026 09:30:37 +0800 Subject: [PATCH] fix: wrong index in ObjectEditor updateKey causing false 'key exists' error * fix: wrong index in ObjectEditor updateKey causing false 'key exists' error * fix: same index mismatch issue in updateJSON * fix(ui): stabilize ObjectEditor pair keys Use generated ids for key-value pairs instead of array indexes to prevent mismatch issues during editing and rendering. Also replace duplicate-key alerts with toast warnings for a more consistent UI experience. --------- Co-authored-by: RC-CHN <1051989940@qq.com> --- .../src/components/shared/ObjectEditor.vue | 116 ++++++++++-------- 1 file changed, 63 insertions(+), 53 deletions(-) diff --git a/dashboard/src/components/shared/ObjectEditor.vue b/dashboard/src/components/shared/ObjectEditor.vue index 3247d1d22..58b010ce9 100644 --- a/dashboard/src/components/shared/ObjectEditor.vue +++ b/dashboard/src/components/shared/ObjectEditor.vue @@ -28,7 +28,7 @@
-
+
@@ -86,7 +87,7 @@ variant="outlined" hide-details="auto" :placeholder="t('core.common.objectEditor.placeholders.jsonValue')" - @blur="updateJSON(index, pair.value)" + @blur="validateJSON(pair)" :error-messages="pair.jsonError" > @@ -221,9 +222,11 @@