Skip to content

Commit

Permalink
Merge pull request #190 from oceanbase/dengfuping-dev
Browse files Browse the repository at this point in the history
fix(ui): PageContainer min-height should be calc(100vh - 48px) in BasicLayout
  • Loading branch information
dengfuping authored Oct 18, 2023
2 parents 265c33e + 1d58942 commit 45db855
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/BasicLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ const BasicLayout: React.FC<BasicLayoutProps> = ({
...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();
// 侧边栏导航是否收起
Expand Down
12 changes: 7 additions & 5 deletions packages/ui/src/BasicLayout/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ export type BasicLayoutToken = FullToken<any>;
export const genBasicLayoutStyle: GenerateStyle<BasicLayoutToken> = (
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)`,
Expand Down

0 comments on commit 45db855

Please sign in to comment.