From 5b51f3da1b6cbe1bebf682ffb4dfb1e8065b9176 Mon Sep 17 00:00:00 2001 From: ZLY Date: Tue, 23 Sep 2025 09:26:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor(flowEditor):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=BC=96=E8=BE=91=E5=99=A8=E5=92=8C=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=BB=84=E4=BB=B6=E7=BB=93=E6=9E=84=E5=B0=86=20flowEd?= =?UTF-8?q?itor=20=E4=B8=AD=E7=9A=84=E8=8A=82=E7=82=B9=E5=92=8C=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=BC=96=E8=BE=91=E5=99=A8=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=BF=81=E7=A7=BB=E8=87=B3=20components/FlowEditor=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FlowEditor}/node/basicNode/BasicNode.tsx | 4 ++-- .../FlowEditor}/node/endNode/EndNode.tsx | 4 ++-- .../FlowEditor}/node/index.tsx | 0 .../FlowEditor}/node/localNode/LocalNode.tsx | 2 +- .../FlowEditor}/node/startNode/StartNode.tsx | 4 ++-- .../FlowEditor}/node/style/base.module.less | 0 .../node/style/baseOther.module.less | 0 .../FlowEditor}/node/types/defaultType.ts | 0 .../nodeEditors/BasicNodeEditor.tsx | 0 .../FlowEditor}/nodeEditors/EndNodeEditor.tsx | 0 .../nodeEditors/LocalNodeEditor.tsx | 0 .../nodeEditors/StartNodeEditor.tsx | 0 .../nodeEditors/components/AndEditor.tsx | 2 +- .../nodeEditors/components/CodeEditor.tsx | 2 +- .../nodeEditors/components/ConditionEditor.tsx | 2 +- .../nodeEditors/components/CycleEditor.tsx | 2 +- .../components/EventListenEditor.tsx | 2 +- .../nodeEditors/components/EventSelect.tsx | 0 .../nodeEditors/components/EventSendEditor.tsx | 4 ++-- .../nodeEditors/components/ImageEditor.tsx | 2 +- .../components/JsonConvertEditor.tsx | 2 +- .../components/JsonToStringEditor.tsx | 2 +- .../nodeEditors/components/LoopEditor.tsx | 2 +- .../nodeEditors/components/OrEditor.tsx | 2 +- .../nodeEditors/components/ParamsTable.tsx | 0 .../nodeEditors/components/RestEditor.tsx | 2 +- .../nodeEditors/components/ResultEditor.tsx | 2 +- .../components/StringToJsonEditor.tsx | 2 +- .../nodeEditors/components/WaitEditor.tsx | 2 +- .../FlowEditor}/nodeEditors/index.tsx | 0 .../flowEditor/components/nodeContent.tsx | 2 +- .../flowEditor/components/nodeContentOther.tsx | 2 +- .../flowEditor/components/nodeEditModal.tsx | 2 +- src/pages/flowEditor/index.tsx | 6 +++--- src/pages/scene/cover.tsx | 14 +++++++------- src/utils/pubUse.ts | 18 +++++++++--------- 36 files changed, 45 insertions(+), 45 deletions(-) rename src/{pages/flowEditor => components/FlowEditor}/node/basicNode/BasicNode.tsx (83%) rename src/{pages/flowEditor => components/FlowEditor}/node/endNode/EndNode.tsx (83%) rename src/{pages/flowEditor => components/FlowEditor}/node/index.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/node/localNode/LocalNode.tsx (95%) rename src/{pages/flowEditor => components/FlowEditor}/node/startNode/StartNode.tsx (83%) rename src/{pages/flowEditor => components/FlowEditor}/node/style/base.module.less (100%) rename src/{pages/flowEditor => components/FlowEditor}/node/style/baseOther.module.less (100%) rename src/{pages/flowEditor => components/FlowEditor}/node/types/defaultType.ts (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/BasicNodeEditor.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/EndNodeEditor.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/LocalNodeEditor.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/StartNodeEditor.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/AndEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/CodeEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/ConditionEditor.tsx (86%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/CycleEditor.tsx (93%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/EventListenEditor.tsx (88%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/EventSelect.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/EventSendEditor.tsx (79%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/ImageEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/JsonConvertEditor.tsx (86%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/JsonToStringEditor.tsx (86%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/LoopEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/OrEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/ParamsTable.tsx (100%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/RestEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/ResultEditor.tsx (87%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/StringToJsonEditor.tsx (86%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/components/WaitEditor.tsx (97%) rename src/{pages/flowEditor => components/FlowEditor}/nodeEditors/index.tsx (100%) diff --git a/src/pages/flowEditor/node/basicNode/BasicNode.tsx b/src/components/FlowEditor/node/basicNode/BasicNode.tsx similarity index 83% rename from src/pages/flowEditor/node/basicNode/BasicNode.tsx rename to src/components/FlowEditor/node/basicNode/BasicNode.tsx index 050aced..6e04c51 100644 --- a/src/pages/flowEditor/node/basicNode/BasicNode.tsx +++ b/src/components/FlowEditor/node/basicNode/BasicNode.tsx @@ -1,10 +1,10 @@ import React from 'react'; // import styles from '@/pages/flowEditor/node/style/base.module.less'; -import styles from '@/pages/flowEditor/node/style/baseOther.module.less'; +import styles from '@/components/FlowEditor/node/style/baseOther.module.less'; import NodeContent from '@/pages/flowEditor/components/nodeContent'; import NodeContentOther from '@/pages/flowEditor/components/nodeContentOther'; import { useStore } from '@xyflow/react'; -import { defaultNodeTypes } from '@/pages/flowEditor/node/types/defaultType'; +import { defaultNodeTypes } from '@/components/FlowEditor/node/types/defaultType'; const BasicNode = ({ data, id }: { data: defaultNodeTypes; id: string }) => { diff --git a/src/pages/flowEditor/node/endNode/EndNode.tsx b/src/components/FlowEditor/node/endNode/EndNode.tsx similarity index 83% rename from src/pages/flowEditor/node/endNode/EndNode.tsx rename to src/components/FlowEditor/node/endNode/EndNode.tsx index 726254c..6eb7d3a 100644 --- a/src/pages/flowEditor/node/endNode/EndNode.tsx +++ b/src/components/FlowEditor/node/endNode/EndNode.tsx @@ -1,9 +1,9 @@ import React from 'react'; // import styles from '@/pages/flowEditor/node/style/base.module.less'; -import styles from '@/pages/flowEditor/node/style/baseOther.module.less'; +import styles from '@/components/FlowEditor/node/style/baseOther.module.less'; import NodeContent from '@/pages/flowEditor/components/nodeContent'; import { useStore } from '@xyflow/react'; -import { defaultNodeTypes } from '@/pages/flowEditor/node/types/defaultType'; +import { defaultNodeTypes } from '@/components/FlowEditor/node/types/defaultType'; import NodeContentOther from '@/pages/flowEditor/components/nodeContentOther'; diff --git a/src/pages/flowEditor/node/index.tsx b/src/components/FlowEditor/node/index.tsx similarity index 100% rename from src/pages/flowEditor/node/index.tsx rename to src/components/FlowEditor/node/index.tsx diff --git a/src/pages/flowEditor/node/localNode/LocalNode.tsx b/src/components/FlowEditor/node/localNode/LocalNode.tsx similarity index 95% rename from src/pages/flowEditor/node/localNode/LocalNode.tsx rename to src/components/FlowEditor/node/localNode/LocalNode.tsx index 2bcde28..8d347bf 100644 --- a/src/pages/flowEditor/node/localNode/LocalNode.tsx +++ b/src/components/FlowEditor/node/localNode/LocalNode.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useStore } from '@xyflow/react'; // import styles from '@/pages/flowEditor/node/style/base.module.less'; -import styles from '@/pages/flowEditor/node/style/baseOther.module.less'; +import styles from '@/components/FlowEditor/node/style/baseOther.module.less'; import NodeContent from '@/pages/flowEditor/components/nodeContent'; import DynamicIcon from '@/components/DynamicIcon'; import NodeContentOther from '@/pages/flowEditor/components/nodeContentOther'; diff --git a/src/pages/flowEditor/node/startNode/StartNode.tsx b/src/components/FlowEditor/node/startNode/StartNode.tsx similarity index 83% rename from src/pages/flowEditor/node/startNode/StartNode.tsx rename to src/components/FlowEditor/node/startNode/StartNode.tsx index a579e74..cbc76ef 100644 --- a/src/pages/flowEditor/node/startNode/StartNode.tsx +++ b/src/components/FlowEditor/node/startNode/StartNode.tsx @@ -1,9 +1,9 @@ import React from 'react'; // import styles from '@/pages/flowEditor/node/style/base.module.less'; -import styles from '@/pages/flowEditor/node/style/baseOther.module.less'; +import styles from '@/components/FlowEditor/node/style/baseOther.module.less'; import NodeContent from '@/pages/flowEditor/components/nodeContent'; import { useStore } from '@xyflow/react'; -import { defaultNodeTypes } from '@/pages/flowEditor/node/types/defaultType'; +import { defaultNodeTypes } from '@/components/FlowEditor/node/types/defaultType'; import NodeContentOther from '@/pages/flowEditor/components/nodeContentOther'; diff --git a/src/pages/flowEditor/node/style/base.module.less b/src/components/FlowEditor/node/style/base.module.less similarity index 100% rename from src/pages/flowEditor/node/style/base.module.less rename to src/components/FlowEditor/node/style/base.module.less diff --git a/src/pages/flowEditor/node/style/baseOther.module.less b/src/components/FlowEditor/node/style/baseOther.module.less similarity index 100% rename from src/pages/flowEditor/node/style/baseOther.module.less rename to src/components/FlowEditor/node/style/baseOther.module.less diff --git a/src/pages/flowEditor/node/types/defaultType.ts b/src/components/FlowEditor/node/types/defaultType.ts similarity index 100% rename from src/pages/flowEditor/node/types/defaultType.ts rename to src/components/FlowEditor/node/types/defaultType.ts diff --git a/src/pages/flowEditor/nodeEditors/BasicNodeEditor.tsx b/src/components/FlowEditor/nodeEditors/BasicNodeEditor.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/BasicNodeEditor.tsx rename to src/components/FlowEditor/nodeEditors/BasicNodeEditor.tsx diff --git a/src/pages/flowEditor/nodeEditors/EndNodeEditor.tsx b/src/components/FlowEditor/nodeEditors/EndNodeEditor.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/EndNodeEditor.tsx rename to src/components/FlowEditor/nodeEditors/EndNodeEditor.tsx diff --git a/src/pages/flowEditor/nodeEditors/LocalNodeEditor.tsx b/src/components/FlowEditor/nodeEditors/LocalNodeEditor.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/LocalNodeEditor.tsx rename to src/components/FlowEditor/nodeEditors/LocalNodeEditor.tsx diff --git a/src/pages/flowEditor/nodeEditors/StartNodeEditor.tsx b/src/components/FlowEditor/nodeEditors/StartNodeEditor.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/StartNodeEditor.tsx rename to src/components/FlowEditor/nodeEditors/StartNodeEditor.tsx diff --git a/src/pages/flowEditor/nodeEditors/components/AndEditor.tsx b/src/components/FlowEditor/nodeEditors/components/AndEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/AndEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/AndEditor.tsx index f220811..35bed18 100644 --- a/src/pages/flowEditor/nodeEditors/components/AndEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/AndEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/CodeEditor.tsx b/src/components/FlowEditor/nodeEditors/components/CodeEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/CodeEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/CodeEditor.tsx index d62f5fc..41a0dda 100644 --- a/src/pages/flowEditor/nodeEditors/components/CodeEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/CodeEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/ConditionEditor.tsx b/src/components/FlowEditor/nodeEditors/components/ConditionEditor.tsx similarity index 86% rename from src/pages/flowEditor/nodeEditors/components/ConditionEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/ConditionEditor.tsx index 8086479..02e8f7d 100644 --- a/src/pages/flowEditor/nodeEditors/components/ConditionEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/ConditionEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/CycleEditor.tsx b/src/components/FlowEditor/nodeEditors/components/CycleEditor.tsx similarity index 93% rename from src/pages/flowEditor/nodeEditors/components/CycleEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/CycleEditor.tsx index 55f5f92..fc73d5a 100644 --- a/src/pages/flowEditor/nodeEditors/components/CycleEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/CycleEditor.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/EventListenEditor.tsx b/src/components/FlowEditor/nodeEditors/components/EventListenEditor.tsx similarity index 88% rename from src/pages/flowEditor/nodeEditors/components/EventListenEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/EventListenEditor.tsx index 9d6b4ce..ac880ea 100644 --- a/src/pages/flowEditor/nodeEditors/components/EventListenEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/EventListenEditor.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import EventSelect from './EventSelect'; diff --git a/src/pages/flowEditor/nodeEditors/components/EventSelect.tsx b/src/components/FlowEditor/nodeEditors/components/EventSelect.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/components/EventSelect.tsx rename to src/components/FlowEditor/nodeEditors/components/EventSelect.tsx diff --git a/src/pages/flowEditor/nodeEditors/components/EventSendEditor.tsx b/src/components/FlowEditor/nodeEditors/components/EventSendEditor.tsx similarity index 79% rename from src/pages/flowEditor/nodeEditors/components/EventSendEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/EventSendEditor.tsx index a71b436..d2e7220 100644 --- a/src/pages/flowEditor/nodeEditors/components/EventSendEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/EventSendEditor.tsx @@ -1,8 +1,8 @@ import React, { useState } from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; -import EventSelect from '@/pages/flowEditor/nodeEditors/components/EventSelect'; +import EventSelect from '@/components/FlowEditor/nodeEditors/components/EventSelect'; import { tempEventList } from '@/pages/flowEditor/test/exampleFlowData'; const EventSendEditor: React.FC = ({ nodeData, updateNodeData }) => { diff --git a/src/pages/flowEditor/nodeEditors/components/ImageEditor.tsx b/src/components/FlowEditor/nodeEditors/components/ImageEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/ImageEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/ImageEditor.tsx index 07ec0f2..8d61fed 100644 --- a/src/pages/flowEditor/nodeEditors/components/ImageEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/ImageEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/JsonConvertEditor.tsx b/src/components/FlowEditor/nodeEditors/components/JsonConvertEditor.tsx similarity index 86% rename from src/pages/flowEditor/nodeEditors/components/JsonConvertEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/JsonConvertEditor.tsx index 989897b..3c37c01 100644 --- a/src/pages/flowEditor/nodeEditors/components/JsonConvertEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/JsonConvertEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/JsonToStringEditor.tsx b/src/components/FlowEditor/nodeEditors/components/JsonToStringEditor.tsx similarity index 86% rename from src/pages/flowEditor/nodeEditors/components/JsonToStringEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/JsonToStringEditor.tsx index 43fc0a0..3dbca88 100644 --- a/src/pages/flowEditor/nodeEditors/components/JsonToStringEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/JsonToStringEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/LoopEditor.tsx b/src/components/FlowEditor/nodeEditors/components/LoopEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/LoopEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/LoopEditor.tsx index c013d0a..b87aba5 100644 --- a/src/pages/flowEditor/nodeEditors/components/LoopEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/LoopEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/OrEditor.tsx b/src/components/FlowEditor/nodeEditors/components/OrEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/OrEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/OrEditor.tsx index 5658886..c17d819 100644 --- a/src/pages/flowEditor/nodeEditors/components/OrEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/OrEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/ParamsTable.tsx b/src/components/FlowEditor/nodeEditors/components/ParamsTable.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/components/ParamsTable.tsx rename to src/components/FlowEditor/nodeEditors/components/ParamsTable.tsx diff --git a/src/pages/flowEditor/nodeEditors/components/RestEditor.tsx b/src/components/FlowEditor/nodeEditors/components/RestEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/RestEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/RestEditor.tsx index ec7158d..07c9c91 100644 --- a/src/pages/flowEditor/nodeEditors/components/RestEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/RestEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/ResultEditor.tsx b/src/components/FlowEditor/nodeEditors/components/ResultEditor.tsx similarity index 87% rename from src/pages/flowEditor/nodeEditors/components/ResultEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/ResultEditor.tsx index 7b020dd..120711a 100644 --- a/src/pages/flowEditor/nodeEditors/components/ResultEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/ResultEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/StringToJsonEditor.tsx b/src/components/FlowEditor/nodeEditors/components/StringToJsonEditor.tsx similarity index 86% rename from src/pages/flowEditor/nodeEditors/components/StringToJsonEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/StringToJsonEditor.tsx index 9a65465..afac0f3 100644 --- a/src/pages/flowEditor/nodeEditors/components/StringToJsonEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/StringToJsonEditor.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Typography } from '@arco-design/web-react'; import { IconUnorderedList } from '@arco-design/web-react/icon'; import ParamsTable from './ParamsTable'; diff --git a/src/pages/flowEditor/nodeEditors/components/WaitEditor.tsx b/src/components/FlowEditor/nodeEditors/components/WaitEditor.tsx similarity index 97% rename from src/pages/flowEditor/nodeEditors/components/WaitEditor.tsx rename to src/components/FlowEditor/nodeEditors/components/WaitEditor.tsx index 7f0353a..03e4979 100644 --- a/src/pages/flowEditor/nodeEditors/components/WaitEditor.tsx +++ b/src/components/FlowEditor/nodeEditors/components/WaitEditor.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { NodeEditorProps } from '@/pages/flowEditor/nodeEditors'; +import { NodeEditorProps } from '@/components/FlowEditor/nodeEditors'; import { Form, Input, Select } from '@arco-design/web-react'; const { Option } = Select; diff --git a/src/pages/flowEditor/nodeEditors/index.tsx b/src/components/FlowEditor/nodeEditors/index.tsx similarity index 100% rename from src/pages/flowEditor/nodeEditors/index.tsx rename to src/components/FlowEditor/nodeEditors/index.tsx diff --git a/src/pages/flowEditor/components/nodeContent.tsx b/src/pages/flowEditor/components/nodeContent.tsx index 61d4c5c..f69a122 100644 --- a/src/pages/flowEditor/components/nodeContent.tsx +++ b/src/pages/flowEditor/components/nodeContent.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import styles from '@/pages/flowEditor/node/style/base.module.less'; +import styles from '@/components/FlowEditor/node/style/base.module.less'; import { Handle, Position, useStore } from '@xyflow/react'; import { isJSON } from '@/utils/common'; import cronstrue from 'cronstrue/i18n'; diff --git a/src/pages/flowEditor/components/nodeContentOther.tsx b/src/pages/flowEditor/components/nodeContentOther.tsx index 4bdfa3f..cbdd2b6 100644 --- a/src/pages/flowEditor/components/nodeContentOther.tsx +++ b/src/pages/flowEditor/components/nodeContentOther.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import styles from '@/pages/flowEditor/node/style/baseOther.module.less'; +import styles from '@/components/FlowEditor/node/style/baseOther.module.less'; import { Handle, Position, useStore } from '@xyflow/react'; import { isJSON } from '@/utils/common'; import cronstrue from 'cronstrue/i18n'; diff --git a/src/pages/flowEditor/components/nodeEditModal.tsx b/src/pages/flowEditor/components/nodeEditModal.tsx index 3555dc2..25630ca 100644 --- a/src/pages/flowEditor/components/nodeEditModal.tsx +++ b/src/pages/flowEditor/components/nodeEditModal.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { Node } from '@xyflow/react'; import { Drawer, ResizeBox } from '@arco-design/web-react'; -import { getNodeEditorByType } from '../nodeEditors'; +import { getNodeEditorByType } from '@/components/FlowEditor/nodeEditors'; interface NodeData { type?: string; diff --git a/src/pages/flowEditor/index.tsx b/src/pages/flowEditor/index.tsx index aaaddaa..c530d3c 100644 --- a/src/pages/flowEditor/index.tsx +++ b/src/pages/flowEditor/index.tsx @@ -19,11 +19,11 @@ import { } from '@xyflow/react'; import '@xyflow/react/dist/style.css'; import { Button, Modal } from '@arco-design/web-react'; -import { nodeTypeMap, nodeTypes, registerNodeType } from './node'; +import { nodeTypeMap, nodeTypes, registerNodeType } from '@/components/FlowEditor/node'; import SideBar from './sideBar/sideBar'; import { convertFlowData } from '@/utils/convertFlowData'; import { exampleFlowData } from '@/pages/flowEditor/test/exampleFlowData'; -import LocalNode from '@/pages/flowEditor/node/localNode/LocalNode'; +import LocalNode from '@/components/FlowEditor/node/localNode/LocalNode'; import CustomEdge from './components/customEdge'; import CustomConnectionLine from './components/customConnectionLine'; import NodeContextMenu from './components/nodeContextMenu'; @@ -32,7 +32,7 @@ import PaneContextMenu from './components/paneContextMenu'; import NodeEditModal from './components/nodeEditModal'; import AddNodeMenu from './components/addNodeMenu'; import ActionBar from './components/actionBar'; -import { defaultNodeTypes } from '@/pages/flowEditor/node/types/defaultType'; +import { defaultNodeTypes } from '@/components/FlowEditor/node/types/defaultType'; import { localNodeData } from '@/pages/flowEditor/sideBar/config/localNodeData'; import { useAlignmentGuidelines } from '@/hooks/useAlignmentGuidelines'; diff --git a/src/pages/scene/cover.tsx b/src/pages/scene/cover.tsx index 74b104e..9fdf83e 100644 --- a/src/pages/scene/cover.tsx +++ b/src/pages/scene/cover.tsx @@ -1,15 +1,15 @@ import React, { useEffect, useState } from 'react'; import styles from '@/pages/scene/style/cover.module.less'; import { Image, Modal, List } from '@arco-design/web-react'; -import scene01 from '@/assets/images/scene01.jpg'; -import scene02 from '@/assets/images/scene02.jpg'; -import scene03 from '@/assets/images/scene03.jpeg'; -import scene04 from '@/assets/images/scene04.png'; -import scene07 from '@/assets/images/scene07.png'; -import scene08 from '@/assets/images/scene08.jpg'; +import scene01 from '@/public/assets/scene01.png'; +// import scene02 from '@/public/assets/scene02.jpg'; +// import scene03 from '@/public/assets/scene03.png'; +import scene04 from '@/public/assets/scene04.png'; +import scene07 from '@/public/assets/scene07.png'; +// import scene08 from '@/public/assets/scene08.png'; import { getImageUrl } from '@/utils/pubUse'; -const imageList = [scene01, scene02, scene03, scene04, scene07, scene08]; +const imageList = [scene01, scene04, scene07]; interface CoverProps { defaultImage?: string; diff --git a/src/utils/pubUse.ts b/src/utils/pubUse.ts index 8a22462..cdac326 100644 --- a/src/utils/pubUse.ts +++ b/src/utils/pubUse.ts @@ -1,13 +1,13 @@ -import scene01 from '@/assets/images/scene01.jpg'; -import scene02 from '@/assets/images/scene02.jpg'; -import scene03 from '@/assets/images/scene03.jpeg'; -import scene04 from '@/assets/images/scene04.png'; -import scene05 from '@/assets/images/scene05.jpg'; -import scene06 from '@/assets/images/scene06.png'; -import scene07 from '@/assets/images/scene07.png'; -import scene08 from '@/assets/images/scene08.jpg'; +import scene01 from '@/public/assets/scene01.png'; +// import scene02 from '@/public/assets/scene02.jpg'; +// import scene03 from '@/public/assets/scene03.png'; +import scene04 from '@/public/assets/scene04.png'; +// import scene05 from '@/public/assets/scene05.png'; +import scene06 from '@/public/assets/scene06.png'; +import scene07 from '@/public/assets/scene07.png'; +// import scene08 from '@/public/assets/scene08.png'; -const imageList: any[] = [scene01, scene02, scene03, scene04, scene05, scene06, scene07, scene08]; +const imageList: any[] = [scene01, scene04, scene06, scene07]; // 获取assets静态资源 export function getImageUrl(imageName: string) {