diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json
index 48555229a..fa4eb79d8 100644
--- a/packages/plugins/@nocobase/plugin-workflow/package.json
+++ b/packages/plugins/@nocobase/plugin-workflow/package.json
@@ -9,7 +9,6 @@
"main": "./dist/server/index.js",
"devDependencies": {
"@ant-design/icons": "5.x",
- "@emotion/css": "^11.7.1",
"@formily/antd-v5": "1.x",
"@formily/core": "2.x",
"@formily/react": "2.x",
diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/Branch.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/Branch.tsx
index 0e2182812..4b1b488c2 100644
--- a/packages/plugins/@nocobase/plugin-workflow/src/client/Branch.tsx
+++ b/packages/plugins/@nocobase/plugin-workflow/src/client/Branch.tsx
@@ -1,5 +1,8 @@
-import { cx } from '@nocobase/client';
import React from 'react';
+import { CloseOutlined } from '@ant-design/icons';
+
+import { css, cx } from '@nocobase/client';
+
import { AddButton } from './AddButton';
import { useGetAriaLabelOfAddButton } from './hooks/useGetAriaLabelOfAddButton';
import { Node } from './nodes';
@@ -11,12 +14,14 @@ export function Branch({
branchIndex = null,
controller = null,
className,
+ end,
}: {
from?: any;
entry?: any;
branchIndex?: number | null;
controller?: React.ReactNode;
className?: string;
+ end?: boolean;
}) {
const { styles } = useStyles();
const { getAriaLabel } = useGetAriaLabelOfAddButton(from, branchIndex);
@@ -26,7 +31,7 @@ export function Branch({
}
return (
-
+
{controller}
@@ -35,6 +40,11 @@ export function Branch({
))}
+ {end ? (
+
+
+
+ ) : null}
);
}
diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx
index 185db16fe..a6ca12465 100644
--- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx
+++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx
@@ -50,7 +50,6 @@ export interface Instruction {
scope?: { [key: string]: any };
components?: { [key: string]: any };
component?(props): JSX.Element;
- endding?: boolean;
useVariables?(node, options?): VariableOption;
useScopeVariables?(node, options?): VariableOptions;
useInitializers?(node): SchemaInitializerItemOptions | null;
@@ -139,36 +138,13 @@ export function useUpstreamScopes(node) {
export function Node({ data }) {
const { styles } = useStyles();
const { getAriaLabel } = useGetAriaLabelOfAddButton(data);
- const { component: Component = NodeDefaultView, endding } = instructions.get(data.type);
+ const { component: Component = NodeDefaultView } = instructions.get(data.type);
return (
- {!endding ? (
-
- ) : (
-
-
-
- )}
+
);
diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodo.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodo.tsx
index 6dad4278d..07b4c8a5c 100644
--- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodo.tsx
+++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodo.tsx
@@ -1,8 +1,9 @@
-import { css } from '@emotion/css';
+import React, { createContext, useContext, useEffect, useState } from 'react';
import { observer, useField, useFieldSchema, useForm } from '@formily/react';
import { Space, Spin, Tag } from 'antd';
import dayjs from 'dayjs';
-import React, { createContext, useContext, useEffect, useState } from 'react';
+
+import { css } from '@nocobase/client';
import {
CollectionManagerProvider,
diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx
index 074a87701..410359341 100644
--- a/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx
+++ b/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx
@@ -182,6 +182,24 @@ const useStyles = createStyles(({ css, token }) => {
width: 50%;
}
}
+
+ .end-sign {
+ position: relative;
+ flex-grow: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 0;
+ height: 6em;
+ padding: 2em 0;
+ border-left: 1px dashed ${token.colorBgLayout};
+
+ .anticon {
+ font-size: 1.5em;
+ line-height: 100%;
+ }
+ }
`,
nodeBlockClass: css`