diff --git a/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchAction.tsx b/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchAction.tsx
index e5b8b22eff8..39cd17653d5 100644
--- a/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchAction.tsx
+++ b/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchAction.tsx
@@ -16,7 +16,9 @@ import {
ACLActionProvider,
NAMESPACE_UI_SCHEMA,
} from '@nocobase/client';
+import { css } from '@emotion/css';
import { Avatar } from 'antd';
+import { List } from 'antd-mobile';
import { createStyles } from 'antd-style';
import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
@@ -78,18 +80,64 @@ export const WorkbenchAction = withDynamicSchemaProps((props) => {
const { styles, cx } = useStyles() as any;
const fieldSchema = useFieldSchema();
const Component = useComponent(props?.targetComponent) || Action;
- return (
-
- }
- confirmTitle={fieldSchema.title}
- style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}
- />
-
- );
+ const { layout = WorkbenchLayout.Grid } = fieldSchema.parent?.parent?.['x-component-props'] || {};
+
+ if (layout === 'list') {
+ const icon = fieldSchema['x-component-props']?.['icon'];
+ const backgroundColor = fieldSchema['x-component-props']?.['iconColor'];
+
+ return (
+
+ span {
+ width: 100%;
+ }
+ padding-top: 0px !important;
+ `,
+ )}
+ {...others}
+ onlyIcon={false}
+ type="text"
+ icon={null}
+ title={
+ } />}
+ onClick={() => {}}
+ style={{ marginTop: '5px' }}
+ >
+
+
+ }
+ confirmTitle={fieldSchema.title}
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: '100%',
+ backgroundColor: 'rgb(255, 255, 255)',
+ }}
+ />
+
+ );
+ } else {
+ return (
+
+ }
+ confirmTitle={fieldSchema.title}
+ style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}
+ />
+
+ );
+ }
});
diff --git a/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx b/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx
index 7197fac0908..28b1c2299b2 100644
--- a/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx
+++ b/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx
@@ -7,7 +7,7 @@
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
-import { observer, useFieldSchema } from '@formily/react';
+import { observer, useFieldSchema, RecursionField } from '@formily/react';
import {
CollectionContext,
createStyles,
@@ -90,18 +90,7 @@ const InternalIcons = () => {
}
>
{fieldSchema.mapProperties((s, key) => {
- const icon = s['x-component-props']?.['icon'];
- const backgroundColor = s['x-component-props']?.['iconColor'];
- return (
- } />}
- onClick={() => {}}
- style={{ marginTop: '5px' }}
- >
-
-
- );
+ return ;
})}
)}
@@ -145,6 +134,10 @@ const useStyles = createStyles(({ token, css }) => ({
margin-bottom: ${token.paddingLG}px;
margin-left: ${token.paddingLG}px;
}
+ .adm-list-body-inner {
+ margin-top: 6px;
+ margin-bottom: 3px;
+ }
}
`,
}));