From 4eb56372a5e06fc5c8e40a69a6eba6e243922120 Mon Sep 17 00:00:00 2001 From: daitian Date: Sat, 2 Sep 2023 08:14:24 +0800 Subject: [PATCH] add FlowEditorPage --- .../flowEditor/left/ControlPanel.vue | 73 +++++++++++++++++++ .../flowEditor/left/ItemSelector.vue | 36 +++++++++ frontend/src/layouts/MainLayout.vue | 7 ++ frontend/src/pages/FlowEditorPage.vue | 37 ++++++++++ frontend/src/router/routes.ts | 20 +++-- 5 files changed, 167 insertions(+), 6 deletions(-) create mode 100644 frontend/src/components/flowEditor/left/ControlPanel.vue create mode 100644 frontend/src/components/flowEditor/left/ItemSelector.vue create mode 100644 frontend/src/pages/FlowEditorPage.vue diff --git a/frontend/src/components/flowEditor/left/ControlPanel.vue b/frontend/src/components/flowEditor/left/ControlPanel.vue new file mode 100644 index 0000000..41a5bda --- /dev/null +++ b/frontend/src/components/flowEditor/left/ControlPanel.vue @@ -0,0 +1,73 @@ + + + diff --git a/frontend/src/components/flowEditor/left/ItemSelector.vue b/frontend/src/components/flowEditor/left/ItemSelector.vue new file mode 100644 index 0000000..24ed954 --- /dev/null +++ b/frontend/src/components/flowEditor/left/ItemSelector.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue index 71b3d2c..984994d 100644 --- a/frontend/src/layouts/MainLayout.vue +++ b/frontend/src/layouts/MainLayout.vue @@ -62,6 +62,13 @@ const essentialLinks: EssentialLinkProps[] = [ link: '/#/ruleEditor', target:'_self' }, + { + title: 'FlowEditor', + caption: 'FlowEditor', + icon: 'account_tree', + link: '/#/flowEditor', + target:'_self' + }, { title:'', isSeparator:true diff --git a/frontend/src/pages/FlowEditorPage.vue b/frontend/src/pages/FlowEditorPage.vue new file mode 100644 index 0000000..1ce2bc7 --- /dev/null +++ b/frontend/src/pages/FlowEditorPage.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/frontend/src/router/routes.ts b/frontend/src/router/routes.ts index 0b5f767..6d5fc12 100644 --- a/frontend/src/router/routes.ts +++ b/frontend/src/router/routes.ts @@ -4,13 +4,21 @@ const routes: RouteRecordRaw[] = [ { path: '/', component: () => import('layouts/MainLayout.vue'), - children: [{ path: '', component: () => import('pages/IndexPage.vue') }], - }, - { - path: '/ruleEditor/', - component: () => import('layouts/MainLayout.vue'), - children: [{ path: '', component: () => import('pages/RuleEditor.vue') }], + children: [ + { path: '', component: () => import('pages/IndexPage.vue') }, + { path: 'ruleEditor', component: () => import('pages/RuleEditor.vue') }, + { path: 'flowEditor', component: () => import('pages/FlowEditorPage.vue') } + ], }, + // { + // path: '/ruleEditor/', + // component: () => import('layouts/MainLayout.vue'), + // children: [{ path: '', component: () => import('pages/RuleEditor.vue') }], + // }, + // { + // path: '/flowEditor/', + // component: () => import('layouts/FlowEditorPage.vue'), + // }, // Always leave this as last one, // but you can also remove it