This commit is contained in:
asp_ly 2024-12-13 21:15:56 +08:00
parent fe58ec3759
commit 5c88430ebc
3 changed files with 12 additions and 11 deletions

View File

@ -53,7 +53,8 @@ const categoryConfig: Record<NodeCategory, {
};
interface NodePanelProps {
onNodeDragStart?: (node: NodeDefinition, e: React.DragEvent) => void;
onNodeDragStart?: (node: NodeDefinition, e: React.DragEvent) => void,
nodeDefinitions?: NodeDefinition[]
}
const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
@ -146,7 +147,7 @@ const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
// 构建折叠面板的 items
const collapseItems = Object.entries(categoryConfig).map(([category, {label, key}]) => ({
key,
label: <span style={{ fontSize: '14px', fontWeight: 500 }}>{label}</span>,
label: <span style={{fontSize: '14px', fontWeight: 500}}>{label}</span>,
children: (
<div style={{
display: 'flex',
@ -159,9 +160,9 @@ const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
key={node.id}
title={
<div>
<div style={{ fontSize: '14px', fontWeight: 500 }}>{node.description}</div>
<div style={{ marginTop: 12 }}>
<div style={{ fontSize: '13px', color: '#8c8c8c' }}></div>
<div style={{fontSize: '14px', fontWeight: 500}}>{node.description}</div>
<div style={{marginTop: 12}}>
<div style={{fontSize: '13px', color: '#8c8c8c'}}></div>
<ul style={{
paddingLeft: 16,
margin: '8px 0',

View File

@ -5,7 +5,7 @@ import {useNavigate} from 'react-router-dom';
import * as service from './service';
import type {WorkflowDefinition, WorkflowDefinitionQuery} from './types';
import {DEFAULT_PAGE_SIZE, DEFAULT_CURRENT} from '@/utils/page';
import EditModal from './components/Edit';
import EditModal from './components/EditModal';
const {confirm} = Modal;