diff --git a/packages/ui/src/BasicLayout/index.tsx b/packages/ui/src/BasicLayout/index.tsx index 6fe4d68f9..8a464ef9c 100644 --- a/packages/ui/src/BasicLayout/index.tsx +++ b/packages/ui/src/BasicLayout/index.tsx @@ -96,9 +96,9 @@ const BasicLayout: React.FC = ({ ...restProps }) => { const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); - const prefixCls = getPrefixCls('basic-layout', customizePrefixCls); + const prefixCls = getPrefixCls('pro-basic-layout', customizePrefixCls); const { wrapSSR } = useStyle(prefixCls); - const basicLayoutCls = classNames(className); + const basicLayoutCls = classNames(prefixCls, className); const navigate = useNavigate(); // 侧边栏导航是否收起 diff --git a/packages/ui/src/BasicLayout/style/index.ts b/packages/ui/src/BasicLayout/style/index.ts index f8d8048da..4babdde0b 100644 --- a/packages/ui/src/BasicLayout/style/index.ts +++ b/packages/ui/src/BasicLayout/style/index.ts @@ -7,13 +7,15 @@ export type BasicLayoutToken = FullToken; export const genBasicLayoutStyle: GenerateStyle = ( token: BasicLayoutToken ): CSSObject => { - const { proComponentsCls } = token; + const { componentCls, proComponentsCls } = token; return { - // Set style of PageContainer in BasicLayout - [`${proComponentsCls}-page-container`]: { - // 48px is the height of BasicLayout header - minHeight: 'calc(100vh - 48px)', + [`${componentCls}`]: { + // Set style of PageContainer in BasicLayout + [`${proComponentsCls}-page-container`]: { + // 48px is the height of BasicLayout header + minHeight: 'calc(100vh - 48px)', + }, }, [`${proComponentsCls}-footer-bar`]: { width: `calc(100% - 192px - 24px)`,