diff --git a/packages/core/client/src/schema-initializer/SchemaInitializer.tsx b/packages/core/client/src/schema-initializer/SchemaInitializer.tsx index 0543839070..4b00874f56 100644 --- a/packages/core/client/src/schema-initializer/SchemaInitializer.tsx +++ b/packages/core/client/src/schema-initializer/SchemaInitializer.tsx @@ -58,6 +58,7 @@ SchemaInitializer.Button = observer( const [searchValue, setSearchValue] = useState(''); const [isPending, startTransition] = useTransition(); const menuItems = useRef([]); + const { styles } = useStyles(); const changeMenu = (v: boolean) => { // 这里是为了防止当鼠标快速滑过时,终止菜单的渲染,防止卡顿 @@ -155,6 +156,7 @@ SchemaInitializer.Button = observer( key: item.key || `item-group-${indexA}`, label, title: label, + popupClassName: styles.nbMenuItemGroup, children: renderItems(item.children), } ); diff --git a/packages/core/client/src/schema-initializer/style.ts b/packages/core/client/src/schema-initializer/style.ts index 6d7d033656..6bc0def6b4 100644 --- a/packages/core/client/src/schema-initializer/style.ts +++ b/packages/core/client/src/schema-initializer/style.ts @@ -1,10 +1,12 @@ import { createStyles } from 'antd-style'; -export const useStyles = createStyles(() => { +export const useStyles = createStyles(({ token }) => { return { nbMenuItemGroup: { maxHeight: '50vh', - overflow: 'auto', + overflowY: 'auto', + boxShadow: token.boxShadowSecondary, + borderRadius: token.borderRadiusLG, }, }; });