qsoft-x6-materials-six
Version:
qsoft-x6-materials
205 lines (204 loc) • 5.44 kB
JavaScript
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var Convert = function Convert() {
return {
name: '转化节点',
inputs: '',
outputs: '',
width: 220,
height: 150,
shape: 'react-shape',
ports: {
groups: {
top: {
position: 'top',
attrs: {
circle: {
r: 6,
// 增大端口半径
magnet: true,
stroke: '#5F75FF',
strokeWidth: 2,
// 加粗描边
fill: '#fff',
style: {
cursor: 'pointer' // 添加指针效果
}
}
},
zIndex: 10 // 提高z-index确保端口在顶层
},
bottom: {
position: 'bottom',
attrs: {
circle: {
r: 6,
magnet: true,
stroke: '#5F75FF',
strokeWidth: 2,
fill: '#fff',
style: {
cursor: 'pointer'
}
}
},
zIndex: 10
},
left: {
position: 'left',
attrs: {
circle: {
r: 6,
magnet: true,
stroke: '#5F75FF',
strokeWidth: 2,
fill: '#fff',
style: {
cursor: 'pointer'
}
}
},
zIndex: 10
},
right: {
position: 'right',
attrs: {
circle: {
r: 6,
magnet: true,
stroke: '#5F75FF',
strokeWidth: 2,
fill: '#fff',
style: {
cursor: 'pointer'
}
}
},
zIndex: 10
}
},
items: [{
id: 't',
group: 'top'
}, {
id: 'r',
group: 'right'
}, {
id: 'b',
group: 'bottom'
}, {
id: 'l',
group: 'left'
}]
},
component: function component(node) {
var name = node.prop('name') || '转化节点';
var inputs = node.prop('inputs') || '';
var outputs = node.prop('outputs') || '';
return /*#__PURE__*/React.createElement("div", {
style: {
width: '100%',
height: '100%',
border: '2px solid #5F75FF',
borderRadius: '8px',
background: '#fff',
fontFamily: 'PingFang SC, sans-serif',
display: 'flex',
flexDirection: 'column',
boxShadow: '0 2px 10px 0 rgba(95,117,255,0.1)',
overflow: 'hidden',
transition: 'all 0.2s ease',
':hover': {
boxShadow: '0 4px 12px 0 rgba(95,117,255,0.2)'
}
}
}, /*#__PURE__*/React.createElement("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '10px 16px',
background: 'linear-gradient(90deg, #F5F8FF 0%, #FFFFFF 100%)',
borderBottom: '1px solid #F0F4FF'
}
}, /*#__PURE__*/React.createElement("span", {
style: {
fontSize: '14px',
color: '#1A2AFF',
fontWeight: 500,
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
maxWidth: '180px'
}
}, name)), /*#__PURE__*/React.createElement("div", {
style: {
display: 'flex',
flexDirection: 'column',
padding: '12px 16px',
background: '#fff',
flex: 1,
gap: '12px'
}
}, /*#__PURE__*/React.createElement("div", {
style: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
padding: '6px 12px',
background: '#F9FBFF',
borderRadius: '6px',
border: '1px solid #F0F4FF'
}
}, /*#__PURE__*/React.createElement("span", {
style: {
fontSize: '12px',
color: '#5F75FF',
fontWeight: 500
}
}, "\u8F93\u5165"), /*#__PURE__*/React.createElement("span", {
style: {
fontSize: '12px',
color: '#333',
background: '#F0F4FF',
padding: '4px 10px',
borderRadius: '4px',
maxWidth: '120px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
}
}, inputs)), /*#__PURE__*/React.createElement("div", {
style: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
padding: '6px 10px',
background: '#F9FBFF',
borderRadius: '6px',
border: '1px solid #F0F4FF'
}
}, /*#__PURE__*/React.createElement("span", {
style: {
fontSize: '12px',
color: '#5F75FF',
fontWeight: 500
}
}, "\u8F93\u51FA"), /*#__PURE__*/React.createElement("span", {
style: {
fontSize: '12px',
color: '#333',
background: '#F0F4FF',
padding: '4px 10px',
borderRadius: '4px',
maxWidth: '120px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
}
}, outputs))));
}
};
};
var _default = exports["default"] = Convert;