Skip to content

Commit

Permalink
fix: disableContentMargin
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Mar 25, 2022
1 parent ae8310e commit 8ef3d2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pro-layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design-vue/pro-layout",
"version": "3.2.0-rc.1",
"version": "3.2.0-rc.3",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
Expand Down
7 changes: 7 additions & 0 deletions packages/pro-layout/src/BasicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ const ProLayout = defineComponent({
)
)

const contentClassName = {
[`${baseClassName.value}-content`]: true,
[`${baseClassName.value}-has-header`]: headerDom,
[`${baseClassName.value}-content-disable-margin`]: props.disableContentMargin,
}

return (
<>
{pure ? (
Expand Down Expand Up @@ -314,6 +320,7 @@ const ProLayout = defineComponent({
{headerDom.value}
<WrapContent
isChildrenLayout={props.isChildrenLayout}
class={contentClassName}
style={props.disableContentMargin ? undefined : props.contentStyle}
>
{props.loading ? <PageLoading /> : slots.default?.()}
Expand Down

0 comments on commit 8ef3d2e

Please sign in to comment.