diff --git a/src/App.vue b/src/App.vue index 2ab9232..3608cb3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -59,4 +59,7 @@ const fontColor = computed(() => { background-color: rgb(1, 169, 255); border-radius: 4px; } +.lf-ai-node,.lf-element-text{ + cursor:pointer !important; +} \ No newline at end of file diff --git a/src/components/flow/nodes/BaseNode.js b/src/components/flow/nodes/BaseNode.js index c6f04e8..9df3530 100644 --- a/src/components/flow/nodes/BaseNode.js +++ b/src/components/flow/nodes/BaseNode.js @@ -161,8 +161,16 @@ class RedNode extends RectNode { getShape() { const { text, x, y, width, height, radius } = this.props.model; const style = this.props.model.getNodeStyle(); - const node = this.props.model.properties?.data?.parameters; - console.log("+++", x, y, width, height); + let subText=(this.props.model.properties?.data?.oper_sub_type_name||""); + let subType = (this.props.model.properties?.data?.oper_sub_type_name||"").split("").filter(t=>t.length>0).map((t,idx)=>{ + return h("text",{ + x:x-width/2+8, + y:y+idx*13-(subText.length==3?8:14), + style: "text-anchor:left;fill:#FFCDD2;font-size:12px;", + },t) + }); + + const node = this.props.model.properties?.data?.parameters; let inputs = makeX(node?.inputs || []).map((d, idx) => h( "svg", @@ -231,6 +239,23 @@ class RedNode extends RectNode { rx: radius, ry: radius, }), + h("rect",{ + fill: "#C62828", + x: x - width / 2, + y: y - height / 2, + width:30, + height, + rx: radius, + ry: radius, + }), + h("rect",{ + fill: "#C62828", + x: x - width / 2+20, + y: y - height / 2, + width:10, + height, + }), + ...subType, ...inputs, ...outputs, ]