Skip to content

Commit fb412b6

Browse files
committed
fix: When dragging and adding a workflow function node, it prompts that the ID does not exist
1 parent 5d10949 commit fb412b6

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

ui/src/views/application-workflow/component/DropdownMenu.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<div
5050
class="workflow-dropdown-item cursor flex p-8-12"
5151
@click.stop="clickNodes(functionLibNode, item, 'function')"
52-
@mousedown.stop="onmousedown(functionLibNode, item)"
52+
@mousedown.stop="onmousedown(functionLibNode, item, 'function')"
5353
>
5454
<component
5555
:is="iconComponent(`function-lib-node-icon`)"
@@ -229,6 +229,7 @@ function onmousedown(item: any, data?: any, type?: string) {
229229
}
230230
}
231231
}
232+
console.log('xx', item)
232233
props.workflowRef?.onmousedown(item)
233234
emit('onmousedown', item)
234235
}

ui/src/workflow/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</template>
66
<script setup lang="ts">
77
import LogicFlow from '@logicflow/core'
8-
import { ref, onMounted, computed, nextTick } from 'vue'
8+
import { ref, onMounted, computed } from 'vue'
99
import AppEdge from './common/edge'
1010
import Control from './common/NodeControl.vue'
1111
import { baseNodes } from '@/workflow/common/data'

ui/src/workflow/nodes/function-lib-node/index.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ const validate = () => {
112112
}
113113
114114
const update_field = () => {
115+
if (!props.nodeModel.properties.node_data.function_lib_id) {
116+
set(props.nodeModel.properties, 'status', 500)
117+
return
118+
}
115119
applicationApi
116120
.getFunctionLib(id, props.nodeModel.properties.node_data.function_lib_id)
117121
.then((ok) => {

0 commit comments

Comments
 (0)