From 159fe14f4bd43fc2ee246daecdb7f95281d0dbe8 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 28 Mar 2023 15:35:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E6=AE=B5=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=AF=B9=E8=B1=A1=E6=88=96=E7=A9=BA=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E6=97=B6=E8=A7=A3=E6=9E=90=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024909 --user=宋昌昌 【测试跟踪】github#23178,自定义字段文本框输入{}会自动变为[object Object] https://www.tapd.cn/55049933/s/1356477 --- framework/sdk-parent/frontend/src/utils/custom_field.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/frontend/src/utils/custom_field.js b/framework/sdk-parent/frontend/src/utils/custom_field.js index d84b396484..be408edaf9 100644 --- a/framework/sdk-parent/frontend/src/utils/custom_field.js +++ b/framework/sdk-parent/frontend/src/utils/custom_field.js @@ -197,8 +197,8 @@ export function sortCustomFields(customFields) { let total = 0; //定义total用于控制循环结束 for (let i = 0; total < customFields.length; total++) { if ( - typeof customFields[i].defaultValue === "string" || - customFields[i].defaultValue instanceof String + (typeof customFields[i].defaultValue === "string" || + customFields[i].defaultValue instanceof String) && customFields[i].defaultValue !== '{}' && customFields[i].defaultValue !== '[]' ) { try { customFields[i].defaultValue = JSON.parse(customFields[i].defaultValue);