Skip to content

Commit b59cd79

Browse files
committed
fix: The local file node of the knowledge base workflow has not been verified
1 parent f665b5f commit b59cd79

File tree

1 file changed

+13
-2
lines changed
  • ui/src/workflow/nodes/data-source-local-node

1 file changed

+13
-2
lines changed

ui/src/workflow/nodes/data-source-local-node/index.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
label-position="top"
99
require-asterisk-position="right"
1010
label-width="auto"
11+
ref="NodeFormRef"
1112
>
1213
<el-form-item
1314
:label="$t('workflow.nodes.dataSourceLocalNode.fileFormat.label')"
@@ -17,6 +18,7 @@
1718
message: $t('workflow.nodes.dataSourceLocalNode.fileFormat.requiredMessage'),
1819
trigger: 'change',
1920
}"
21+
prop="file_type_list"
2022
>
2123
<el-select
2224
v-model="form_data.file_type_list"
@@ -46,6 +48,7 @@
4648
message: $t('common.inputPlaceholder'),
4749
trigger: 'change',
4850
}"
51+
prop="file_count_limit"
4952
>
5053
<el-input-number
5154
v-model="form_data.file_count_limit"
@@ -65,6 +68,7 @@
6568
message: $t('common.inputPlaceholder'),
6669
trigger: 'change',
6770
}"
71+
prop="file_size_limit"
6872
>
6973
<el-input-number
7074
v-model="form_data.file_size_limit"
@@ -84,9 +88,9 @@
8488

8589
<script setup lang="ts">
8690
import NodeContainer from '@/workflow/common/NodeContainer.vue'
87-
import { computed } from 'vue'
91+
import { computed, onMounted, ref } from 'vue'
8892
import { set } from 'lodash'
89-
93+
const NodeFormRef = ref()
9094
const props = defineProps<{ nodeModel: any }>()
9195
9296
const file_type_list_options = ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV']
@@ -109,6 +113,13 @@ const form_data = computed({
109113
set(props.nodeModel.properties, 'node_data', value)
110114
},
111115
})
116+
const validate = () => {
117+
return NodeFormRef.value.validate()
118+
}
119+
120+
onMounted(() => {
121+
set(props.nodeModel, 'validate', validate)
122+
})
112123
</script>
113124

114125
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)