Commit c15c6e6d authored by Sendya's avatar Sendya Committed by 言肆

fix: page-container offsetTop err

parent 1eb4eba0
{ {
"name": "@ant-design-vue/pro-layout", "name": "@ant-design-vue/pro-layout",
"version": "3.0.0-beta.9", "version": "3.0.0-beta.11",
"main": "./lib/index.js", "main": "./lib/index.js",
"module": "./es/index.js", "module": "./es/index.js",
"repository": { "repository": {
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"lint:fix": "eslint --fix src/ -c .eslintrc.js --ext .tsx,.ts", "lint:fix": "eslint --fix src/ -c .eslintrc.js --ext .tsx,.ts",
"compile": "vc-tools run compile", "compile": "vc-tools run compile",
"test": "cross-env NODE_ENV=test jest --config .jest.js", "test": "cross-env NODE_ENV=test jest --config .jest.js",
"prepublishOnly": "npm run lint && npm run compile && npm run test" "prepublishOnly": "npm run lint && npm run compile"
}, },
"peerDependencies": { "peerDependencies": {
"ant-design-vue": ">=2.2.0", "ant-design-vue": ">=2.2.0",
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
"core-js": "^3.9.1", "core-js": "^3.9.1",
"lodash-es": "^4.17.20", "lodash-es": "^4.17.20",
"omit.js": "^2.0.2", "omit.js": "^2.0.2",
"vue": "^3.1.0", "vue": "^3.1.1",
"vue-types": "^3.0.1" "vue-types": "^3.0.1"
}, },
"files": [ "files": [
......
...@@ -283,10 +283,7 @@ const PageContainer = defineComponent({ ...@@ -283,10 +283,7 @@ const PageContainer = defineComponent({
return () => ( return () => (
<div class={classNames.value}> <div class={classNames.value}>
{value.fixedHeader ? ( {value.fixedHeader ? (
<Affix <Affix offsetTop={value.fixedHeader ? value.headerHeight : 0} {...affixProps.value}>
offsetTop={value.hasHeader && value.fixedHeader ? value.headerHeight : 0}
{...affixProps.value}
>
{headerDom.value} {headerDom.value}
</Affix> </Affix>
) : ( ) : (
......
import { Slots } from 'vue'; import { Slots } from 'vue';
import { MenuDataItem } from '../typings'; import { MenuDataItem } from '../typings';
export { default as PropTypes } from 'ant-design-vue/es/_util/vue-types'; import PropTypes from 'ant-design-vue/es/_util/vue-types';
export { default as isUrl } from './isUrl'; export { default as isUrl } from './isUrl';
export { default as isImg } from './isImg'; export { default as isImg } from './isImg';
export { default as isNil } from './isNil'; export { default as isNil } from './isNil';
export { PropTypes };
export function warn(valid: boolean, message: string) { export function warn(valid: boolean, message: string) {
// Support uglify // Support uglify
......
import './_utils/mock-func'; import './_utils/mock-func';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { PropType } from 'vue'; import type { PropType } from 'vue';
import BasicLayout, { BasicLayoutProps } from '../src'; import BasicLayout, { BasicLayoutProps } from '../src';
const title = 'Pro Tests'; const title = 'Pro Tests';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment