1
This commit is contained in:
parent
fe58ec3759
commit
5c88430ebc
@ -53,7 +53,8 @@ const categoryConfig: Record<NodeCategory, {
|
|||||||
};
|
};
|
||||||
|
|
||||||
interface NodePanelProps {
|
interface NodePanelProps {
|
||||||
onNodeDragStart?: (node: NodeDefinition, e: React.DragEvent) => void;
|
onNodeDragStart?: (node: NodeDefinition, e: React.DragEvent) => void,
|
||||||
|
nodeDefinitions?: NodeDefinition[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
|
const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
|
||||||
@ -146,7 +147,7 @@ const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
|
|||||||
// 构建折叠面板的 items
|
// 构建折叠面板的 items
|
||||||
const collapseItems = Object.entries(categoryConfig).map(([category, {label, key}]) => ({
|
const collapseItems = Object.entries(categoryConfig).map(([category, {label, key}]) => ({
|
||||||
key,
|
key,
|
||||||
label: <span style={{ fontSize: '14px', fontWeight: 500 }}>{label}</span>,
|
label: <span style={{fontSize: '14px', fontWeight: 500}}>{label}</span>,
|
||||||
children: (
|
children: (
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -159,9 +160,9 @@ const NodePanel: React.FC<NodePanelProps> = ({onNodeDragStart}) => {
|
|||||||
key={node.id}
|
key={node.id}
|
||||||
title={
|
title={
|
||||||
<div>
|
<div>
|
||||||
<div style={{ fontSize: '14px', fontWeight: 500 }}>{node.description}</div>
|
<div style={{fontSize: '14px', fontWeight: 500}}>{node.description}</div>
|
||||||
<div style={{ marginTop: 12 }}>
|
<div style={{marginTop: 12}}>
|
||||||
<div style={{ fontSize: '13px', color: '#8c8c8c' }}>功能特点:</div>
|
<div style={{fontSize: '13px', color: '#8c8c8c'}}>功能特点:</div>
|
||||||
<ul style={{
|
<ul style={{
|
||||||
paddingLeft: 16,
|
paddingLeft: 16,
|
||||||
margin: '8px 0',
|
margin: '8px 0',
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {useNavigate} from 'react-router-dom';
|
|||||||
import * as service from './service';
|
import * as service from './service';
|
||||||
import type {WorkflowDefinition, WorkflowDefinitionQuery} from './types';
|
import type {WorkflowDefinition, WorkflowDefinitionQuery} from './types';
|
||||||
import {DEFAULT_PAGE_SIZE, DEFAULT_CURRENT} from '@/utils/page';
|
import {DEFAULT_PAGE_SIZE, DEFAULT_CURRENT} from '@/utils/page';
|
||||||
import EditModal from './components/Edit';
|
import EditModal from './components/EditModal';
|
||||||
|
|
||||||
const {confirm} = Modal;
|
const {confirm} = Modal;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user