|
|
|
@ -114,16 +114,19 @@ export default defineComponent({
|
|
|
|
|
globalParams: { |
|
|
|
|
validator() { |
|
|
|
|
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) { |
|
|
|
|
const prop = param.value |
|
|
|
|
if (!prop) { |
|
|
|
|
return new Error(t('project.dag.prop_empty')) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (props.has(prop)) { |
|
|
|
|
return new Error(t('project.dag.prop_repeat')) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
props.add(prop) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|