Skip to content

Commit

Permalink
fix: page-container offsetTop err
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Jul 1, 2021
1 parent 1eb4eba commit c15c6e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design-vue/pro-layout",
"version": "3.0.0-beta.9",
"version": "3.0.0-beta.11",
"main": "./lib/index.js",
"module": "./es/index.js",
"repository": {
Expand All @@ -19,7 +19,7 @@
"lint:fix": "eslint --fix src/ -c .eslintrc.js --ext .tsx,.ts",
"compile": "vc-tools run compile",
"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": {
"ant-design-vue": ">=2.2.0",
Expand Down Expand Up @@ -76,7 +76,7 @@
"core-js": "^3.9.1",
"lodash-es": "^4.17.20",
"omit.js": "^2.0.2",
"vue": "^3.1.0",
"vue": "^3.1.1",
"vue-types": "^3.0.1"
},
"files": [
Expand Down
5 changes: 1 addition & 4 deletions src/PageContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,7 @@ const PageContainer = defineComponent({
return () => (
<div class={classNames.value}>
{value.fixedHeader ? (
<Affix
offsetTop={value.hasHeader && value.fixedHeader ? value.headerHeight : 0}
{...affixProps.value}
>
<Affix offsetTop={value.fixedHeader ? value.headerHeight : 0} {...affixProps.value}>
{headerDom.value}
</Affix>
) : (
Expand Down
3 changes: 2 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Slots } from 'vue';
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 isImg } from './isImg';
export { default as isNil } from './isNil';
export { PropTypes };

export function warn(valid: boolean, message: string) {
// Support uglify
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './_utils/mock-func';
import { mount } from '@vue/test-utils';
import { PropType } from 'vue';
import type { PropType } from 'vue';
import BasicLayout, { BasicLayoutProps } from '../src';

const title = 'Pro Tests';
Expand Down

0 comments on commit c15c6e6

Please sign in to comment.