diff --git a/packages/core/client/src/schema-component/antd/action/Action.Area.style.ts b/packages/core/client/src/schema-component/antd/action/Action.Area.style.ts index 232d763b8..8aa43c5d9 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Area.style.ts +++ b/packages/core/client/src/schema-component/antd/action/Action.Area.style.ts @@ -1,7 +1,30 @@ import { createStyles } from 'antd-style'; export const useStyles = createStyles(({ css, token }) => { - return css` - padding-top: ${token.padding}px; - `; + return { + container: css` + padding-top: ${token.padding}px; + `, + footer: css` + display: flex; + justify-content: flex-end; + width: 100%; + flex-shrink: 0; + padding-bottom: ${token.padding}px; + border-bottom: 1px solid rgba(5, 5, 5, 0.06); + .ant-btn { + margin-right: ${token.margin}px; + } + + .title { + flex: 1; + margin: 0; + color: rgba(0, 0, 0, 0.88); + font-weight: 600; + font-size: ${token.fontSizeHeading3}px; + line-height: ${token.lineHeightHeading3}; + padding-right: 24px; + } + `, + }; }); diff --git a/packages/core/client/src/schema-component/antd/action/Action.Area.tsx b/packages/core/client/src/schema-component/antd/action/Action.Area.tsx index 50c59251b..ca27283d0 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Area.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Area.tsx @@ -32,11 +32,13 @@ export const ActionAreaStub = () => { export const ActionAreaPlayer = ({ children }) => { const { visible, setVisible } = useActionContext(); - const { prevSetVisible, setPrevSetVisible, ref = { current: null } } = useContext(ActionAreaContext); + const { prevSetVisible, setPrevSetVisible, ref } = useContext(ActionAreaContext); useEffect(() => { if (visible) { setPrevSetVisible?.(() => { prevSetVisible?.(false); + // 因为无法判断是不是自己之前的那个 setVisible,如果是同一个 setVisible 那么上面那个设置会导致不显示 + setVisible(true); return setVisible; }); } @@ -47,22 +49,38 @@ export const ActionAreaPlayer = ({ children }) => { export const ActionArea: ComposedActionDrawer = observer( (props) => { - const { footerNodeName = 'Action.Drawer.Footer' } = props; + const { footerNodeName = 'ActionArea.Footer' } = props; const schema = useFieldSchema(); const field = useField(); const { styles } = useStyles(); const Current = () => ( -
- { - return s['x-component'] !== footerNodeName; - }} - /> -
+ <> +
+
+ {field.title} +
+ { + return s['x-component'] === footerNodeName; + }} + /> +
+ +
+ { + return s['x-component'] !== footerNodeName; + }} + /> +
+ ); return ( diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx index d247ee1d5..e262b719a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx @@ -45,7 +45,7 @@ const useStyles = createStyles(({ css, token }) => { overflow-y: scroll; padding: 8px; background-color: white; - width: 800px; + width: 600px; } .workflow-canvas-wrapper {