diff --git a/packages/core/client/src/schema-component/core/DesignableSwitch.tsx b/packages/core/client/src/schema-component/core/DesignableSwitch.tsx index b6f86142b4..245460c717 100644 --- a/packages/core/client/src/schema-component/core/DesignableSwitch.tsx +++ b/packages/core/client/src/schema-component/core/DesignableSwitch.tsx @@ -9,7 +9,7 @@ import { HighlightOutlined } from '@ant-design/icons'; import { Button, Tooltip } from 'antd'; -import React from 'react'; +import React, { FC } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; import { useDesignable } from '..'; @@ -24,7 +24,7 @@ const unDesignableStyle = { backgroundColor: 'transparent', }; -export const DesignableSwitch = () => { +export const DesignableSwitch: FC<{ style?: React.CSSProperties }> = (props) => { const { designable, setDesignable } = useDesignable(); const { t } = useTranslation(); const { token } = useToken(); @@ -46,7 +46,7 @@ export const DesignableSwitch = () => { icon={} title={t('UI Editor')} // subtitle={'Ctrl+Shift+U'} - style={style} + style={{ ...style, ...props.style }} onClick={() => { setDesignable(!designable); }} diff --git a/packages/plugins/@nocobase/plugin-mobile/src/client/desktop-mode/Header.tsx b/packages/plugins/@nocobase/plugin-mobile/src/client/desktop-mode/Header.tsx index 2fe7aa4cfc..c7ad902bad 100644 --- a/packages/plugins/@nocobase/plugin-mobile/src/client/desktop-mode/Header.tsx +++ b/packages/plugins/@nocobase/plugin-mobile/src/client/desktop-mode/Header.tsx @@ -98,8 +98,8 @@ export const DesktopModeHeader: FC = () => { -
- {allowConfigUI ? : null} +
+ {allowConfigUI ? : null}