mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
chore: 默认 affixOffsetTop 改成 0 (#2623)
* chore: sdk 默认 affixOffsetTop 改成 0 * chore: 默认 affixOffsetTop 改成 0
This commit is contained in:
parent
1791ccae91
commit
608b86f4c0
@ -81,8 +81,7 @@ class AMISComponent extends React.Component {
|
||||
copy: content => {
|
||||
copy(content);
|
||||
toast.success('内容已复制到粘贴板');
|
||||
},
|
||||
affixOffsetTop: 0
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
) : null;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "amis",
|
||||
"version": "1.2.4-beta.9",
|
||||
"version": "1.2.4-beta.15",
|
||||
"description": "一种MIS页面生成工具",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
|
@ -224,7 +224,7 @@ export function loadRenderer(schema: Schema, path: string) {
|
||||
|
||||
const defaultOptions: RenderOptions = {
|
||||
session: 'global',
|
||||
affixOffsetTop: 50,
|
||||
affixOffsetTop: 0,
|
||||
affixOffsetBottom: 0,
|
||||
richTextToken: '',
|
||||
loadRenderer,
|
||||
|
@ -1110,7 +1110,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
if (autoJumpToTopOnPagerChange && this.control) {
|
||||
(findDOMNode(this.control) as HTMLElement).scrollIntoView();
|
||||
const scrolledY = window.scrollY;
|
||||
const offsetTop = affixOffsetTop ?? env?.affixOffsetTop ?? 50;
|
||||
const offsetTop = affixOffsetTop ?? env?.affixOffsetTop ?? 0;
|
||||
scrolledY && window.scroll(0, scrolledY - offsetTop);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user