diff --git a/src/pages/sjtb/configTask/dataTable/index.vue b/src/pages/sjtb/configTask/dataTable/index.vue index 5b75bdcc..0aa3036d 100644 --- a/src/pages/sjtb/configTask/dataTable/index.vue +++ b/src/pages/sjtb/configTask/dataTable/index.vue @@ -87,7 +87,12 @@ function handleModeChange(newValues: string[]) { // 新增节点 added.forEach((value) => { - const item = modeList.value.find(item => item.value === value); + let item = modeList.value.find((item: any) => item.value === value); + // 兼容手动输入:allow-create 时下拉项中不存在该 value,使用输入值作为 label 并补充到 modeList + if (!item) { + item = { value, label: value }; + modeList.value.push(item); + } if (item) { graph.value?.addChildNode(formData.sourceId, { id: value, @@ -359,7 +364,8 @@ function handleCancel() { + collapse-tags-tooltip filterable allow-create default-first-option :reserve-keyword="false" + :placeholder="t('pleaseSelect')" class="custom-select" @change="handleModeChange">