|
|
@ -114,16 +114,19 @@ export default defineComponent({ |
|
|
|
globalParams: { |
|
|
|
globalParams: { |
|
|
|
validator() { |
|
|
|
validator() { |
|
|
|
const props = new Set() |
|
|
|
const props = new Set() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const keys = formValue.value.globalParams.map(item => item.key) |
|
|
|
|
|
|
|
const keysSet = new Set(keys) |
|
|
|
|
|
|
|
if (keysSet.size !== keys.length) { |
|
|
|
|
|
|
|
return new Error(t('project.dag.prop_repeat')) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (const param of formValue.value.globalParams) { |
|
|
|
for (const param of formValue.value.globalParams) { |
|
|
|
const prop = param.value |
|
|
|
const prop = param.value |
|
|
|
if (!prop) { |
|
|
|
if (!prop) { |
|
|
|
return new Error(t('project.dag.prop_empty')) |
|
|
|
return new Error(t('project.dag.prop_empty')) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (props.has(prop)) { |
|
|
|
|
|
|
|
return new Error(t('project.dag.prop_repeat')) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
props.add(prop) |
|
|
|
props.add(prop) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|