mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +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 => {
|
||||||
copy(content);
|
copy(content);
|
||||||
toast.success('内容已复制到粘贴板');
|
toast.success('内容已复制到粘贴板');
|
||||||
},
|
}
|
||||||
affixOffsetTop: 0
|
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
) : null;
|
) : null;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "amis",
|
"name": "amis",
|
||||||
"version": "1.2.4-beta.9",
|
"version": "1.2.4-beta.15",
|
||||||
"description": "一种MIS页面生成工具",
|
"description": "一种MIS页面生成工具",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -224,7 +224,7 @@ export function loadRenderer(schema: Schema, path: string) {
|
|||||||
|
|
||||||
const defaultOptions: RenderOptions = {
|
const defaultOptions: RenderOptions = {
|
||||||
session: 'global',
|
session: 'global',
|
||||||
affixOffsetTop: 50,
|
affixOffsetTop: 0,
|
||||||
affixOffsetBottom: 0,
|
affixOffsetBottom: 0,
|
||||||
richTextToken: '',
|
richTextToken: '',
|
||||||
loadRenderer,
|
loadRenderer,
|
||||||
|
@ -1110,7 +1110,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|||||||
if (autoJumpToTopOnPagerChange && this.control) {
|
if (autoJumpToTopOnPagerChange && this.control) {
|
||||||
(findDOMNode(this.control) as HTMLElement).scrollIntoView();
|
(findDOMNode(this.control) as HTMLElement).scrollIntoView();
|
||||||
const scrolledY = window.scrollY;
|
const scrolledY = window.scrollY;
|
||||||
const offsetTop = affixOffsetTop ?? env?.affixOffsetTop ?? 50;
|
const offsetTop = affixOffsetTop ?? env?.affixOffsetTop ?? 0;
|
||||||
scrolledY && window.scroll(0, scrolledY - offsetTop);
|
scrolledY && window.scroll(0, scrolledY - offsetTop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user