| | |
| | | <slot :name="item" v-bind="data"></slot> |
| | | </template> |
| | | </PageHeader> |
| | | <div |
| | | class="overflow-hidden" |
| | | :class="[`${prefixCls}-content`, contentClass]" |
| | | :style="getContentStyle" |
| | | > |
| | | <div class="overflow-hidden" :class="getContentClass" :style="getContentStyle"> |
| | | <slot></slot> |
| | | </div> |
| | | <PageFooter v-if="getShowFooter" ref="footerRef"> |
| | |
| | | |
| | | const getContentStyle = computed( |
| | | (): CSSProperties => { |
| | | const { contentBackground, contentFullHeight, contentStyle, fixedHeight } = props; |
| | | const bg = contentBackground ? { backgroundColor: '#fff' } : {}; |
| | | const { contentFullHeight, contentStyle, fixedHeight } = props; |
| | | if (!contentFullHeight) { |
| | | return { ...bg, ...contentStyle }; |
| | | return { ...contentStyle }; |
| | | } |
| | | const height = `${unref(pageHeight)}px`; |
| | | return { |
| | | ...bg, |
| | | ...contentStyle, |
| | | minHeight: height, |
| | | ...(fixedHeight ? { height } : {}), |
| | |
| | | }; |
| | | } |
| | | ); |
| | | |
| | | const getContentClass = computed(() => { |
| | | const { contentBackground, contentClass } = props; |
| | | return [ |
| | | `${prefixCls}-content`, |
| | | contentClass, |
| | | { |
| | | [`${prefixCls}-content-bg`]: contentBackground, |
| | | }, |
| | | ]; |
| | | }); |
| | | |
| | | watch( |
| | | () => [contentHeight?.value, getShowFooter.value], |
| | |
| | | getShowFooter, |
| | | pageHeight, |
| | | omit, |
| | | getContentClass, |
| | | }; |
| | | }, |
| | | }); |
| | |
| | | } |
| | | } |
| | | |
| | | &-content-bg { |
| | | background: @component-background; |
| | | } |
| | | |
| | | &--dense { |
| | | .@{prefix-cls}-content { |
| | | margin: 0; |