Feat/loop break node (#17268)

This commit is contained in:
zxhlyh 2025-04-01 16:52:07 +08:00 • committed by GitHub
commit 713902dc47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
64 changed files with 1397 additions and 139 deletions

View file

@ -28,6 +28,11 @@ const nodeDefault: NodeDefault<LoopNodeType> = {
checkValid(payload: LoopNodeType, t: any) {
let errorMessages = ''
payload.loop_variables?.forEach((variable) => {
if (!variable.label)
errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t(`${i18nPrefix}.fields.variable`) })
})
payload.break_conditions!.forEach((condition) => {
if (!errorMessages && (!condition.variable_selector || condition.variable_selector.length === 0))
errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t(`${i18nPrefix}.fields.variable`) })