Skip to content

Commit

Permalink
fix: When dragging and adding a workflow function node, it prompts th…
Browse files Browse the repository at this point in the history
…at the ID does not exist (#1932)

* fix: The application cannot be embedded

* fix: When dragging and adding a workflow function node, it prompts that the ID does not exist
  • Loading branch information
shaohuzhang1 authored Dec 27, 2024
1 parent 116ceef commit d39d480
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ui/src/views/application-workflow/component/DropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<div
class="workflow-dropdown-item cursor flex p-8-12"
@click.stop="clickNodes(functionLibNode, item, 'function')"
@mousedown.stop="onmousedown(functionLibNode, item)"
@mousedown.stop="onmousedown(functionLibNode, item, 'function')"
>
<component
:is="iconComponent(`function-lib-node-icon`)"
Expand Down Expand Up @@ -229,6 +229,7 @@ function onmousedown(item: any, data?: any, type?: string) {
}
}
}
console.log('xx', item)
props.workflowRef?.onmousedown(item)
emit('onmousedown', item)
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/workflow/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import LogicFlow from '@logicflow/core'
import { ref, onMounted, computed, nextTick } from 'vue'
import { ref, onMounted, computed } from 'vue'
import AppEdge from './common/edge'
import Control from './common/NodeControl.vue'
import { baseNodes } from '@/workflow/common/data'
Expand Down
4 changes: 4 additions & 0 deletions ui/src/workflow/nodes/function-lib-node/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ const validate = () => {
}
const update_field = () => {
if (!props.nodeModel.properties.node_data.function_lib_id) {
set(props.nodeModel.properties, 'status', 500)
return
}
applicationApi
.getFunctionLib(id, props.nodeModel.properties.node_data.function_lib_id)
.then((ok) => {
Expand Down

0 comments on commit d39d480

Please sign in to comment.