diff --git a/src/views/perfManage/customTarget/index.vue b/src/views/perfManage/customTarget/index.vue index 64aea8c7..85512ab0 100644 --- a/src/views/perfManage/customTarget/index.vue +++ b/src/views/perfManage/customTarget/index.vue @@ -345,7 +345,7 @@ function fnModalVisibleByEdit(row?: any, id?: any) { } else { fnSelectPerformanceInit(row.neType); modalState.from = Object.assign(modalState.from, row); - modalState.from.expression=modalState.from.exprAlias; + modalState.from.expression = modalState.from.exprAlias; modalState.title = t('views.perfManage.customTarget.editCustom'); modalState.openByEdit = true; } @@ -364,7 +364,7 @@ function fnModalOk() { let result = modalState.from.expression; if (matches) { - matches.forEach((match: any) => { + for (const match of matches) { const valueToReplace = match.slice(1, -1); // 去掉单引号 const found = modalState.neTypPerformance.find( (item: any) => item.label === valueToReplace @@ -378,9 +378,9 @@ function fnModalOk() { }), 3 ); - return false; + return; } - }); + } } else { message.error(t('views.perfManage.customTarget.expressionNoIdTip'), 3); return false; @@ -725,6 +725,7 @@ onMounted(() => {