diff --git a/examples/mobile.tsx b/examples/mobile.tsx index c1b56b92a..197c58304 100644 --- a/examples/mobile.tsx +++ b/examples/mobile.tsx @@ -81,8 +81,7 @@ class AMISComponent extends React.Component { copy: content => { copy(content); toast.success('内容已复制到粘贴板'); - }, - affixOffsetTop: 0 + } })} ) : null; diff --git a/package.json b/package.json index 0c9b512bd..d94eb159f 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/factory.tsx b/src/factory.tsx index da4617f37..a8c1c4025 100644 --- a/src/factory.tsx +++ b/src/factory.tsx @@ -224,7 +224,7 @@ export function loadRenderer(schema: Schema, path: string) { const defaultOptions: RenderOptions = { session: 'global', - affixOffsetTop: 50, + affixOffsetTop: 0, affixOffsetBottom: 0, richTextToken: '', loadRenderer, diff --git a/src/renderers/CRUD.tsx b/src/renderers/CRUD.tsx index c9df48ceb..f4f994881 100644 --- a/src/renderers/CRUD.tsx +++ b/src/renderers/CRUD.tsx @@ -1110,7 +1110,7 @@ export default class CRUD extends React.Component { 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); } }