苗大
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
11 additions and
12 deletions
-
src/components/Page/src/PageWrapper.vue
-
src/views/demo/page/desc/high/index.vue
|
|
|
@ -34,25 +34,24 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { PageWrapperFixedHeightKey } from '@/enums/pageEnum'; |
|
|
|
import { useContentHeight } from '@/hooks/web/useContentHeight'; |
|
|
|
import { useDesign } from '@/hooks/web/useDesign'; |
|
|
|
import { propTypes } from '@/utils/propTypes'; |
|
|
|
import { PageHeader } from 'ant-design-vue'; |
|
|
|
import { omit } from 'lodash-es'; |
|
|
|
import { |
|
|
|
CSSProperties, |
|
|
|
PropType, |
|
|
|
provide, |
|
|
|
computed, |
|
|
|
watch, |
|
|
|
provide, |
|
|
|
ref, |
|
|
|
unref, |
|
|
|
useAttrs, |
|
|
|
useSlots, |
|
|
|
watch, |
|
|
|
} from 'vue'; |
|
|
|
import PageFooter from './PageFooter.vue'; |
|
|
|
import { useDesign } from '@/hooks/web/useDesign'; |
|
|
|
import { propTypes } from '@/utils/propTypes'; |
|
|
|
import { omit } from 'lodash-es'; |
|
|
|
import { PageHeader } from 'ant-design-vue'; |
|
|
|
import { useContentHeight } from '@/hooks/web/useContentHeight'; |
|
|
|
import { useLayoutHeight } from '@/layouts/default/content/useContentViewHeight'; |
|
|
|
import { PageWrapperFixedHeightKey } from '@/enums/pageEnum'; |
|
|
|
|
|
|
|
defineOptions({ |
|
|
|
name: 'PageWrapper', |
|
|
|
@ -114,7 +113,6 @@ |
|
|
|
]; |
|
|
|
}); |
|
|
|
|
|
|
|
const { headerHeightRef } = useLayoutHeight(); |
|
|
|
const getHeaderStyle = computed((): CSSProperties => { |
|
|
|
const { headerSticky } = props; |
|
|
|
if (!headerSticky) { |
|
|
|
@ -123,7 +121,8 @@ |
|
|
|
|
|
|
|
return { |
|
|
|
position: 'sticky', |
|
|
|
top: `${unref(headerHeightRef)}px`, |
|
|
|
top: 0, |
|
|
|
zIndex: 99, |
|
|
|
...props.headerStyle, |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<PageWrapper title="单号:234231029431" contentBackground> |
|
|
|
<PageWrapper title="单号:234231029431" contentBackground headerSticky> |
|
|
|
<template #extra> |
|
|
|
<a-button> 操作一 </a-button> |
|
|
|
<a-button> 操作二 </a-button> |
|
|
|
|