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')"
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"
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"
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"
8488
8589<script setup lang="ts">
8690import NodeContainer from ' @/workflow/common/NodeContainer.vue'
87- import { computed } from ' vue'
91+ import { computed , onMounted , ref } from ' vue'
8892import { set } from ' lodash'
89-
93+ const NodeFormRef = ref ()
9094const props = defineProps <{ nodeModel: any }>()
9195
9296const 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