mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
* docs: 补充 app 模式 CRUD 表头固定遮挡问题说明 Closes #3963 * 改成 app 模式自动加 affixOffsetTop
This commit is contained in:
parent
f507e88496
commit
536af47d6d
@ -24,11 +24,16 @@ import attachmentAdpator from '../src/utils/attachmentAdpator';
|
||||
export function embed(
|
||||
container: string | HTMLElement,
|
||||
schema: any,
|
||||
props?: any,
|
||||
props: any = {},
|
||||
env?: any
|
||||
) {
|
||||
const __ = makeTranslator(env?.locale || props?.locale);
|
||||
|
||||
// app 模式自动加 affixOffsetTop
|
||||
if (!('affixOffsetTop' in props) && schema.type === 'app') {
|
||||
props.affixOffsetTop = 50;
|
||||
}
|
||||
|
||||
if (typeof container === 'string') {
|
||||
container = document.querySelector(container) as HTMLElement;
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ const predefined = {
|
||||
crud: {
|
||||
type: 'crud',
|
||||
draggable: true,
|
||||
api:
|
||||
'http://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample',
|
||||
api: 'http://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample',
|
||||
syncLocation: false,
|
||||
perPage: 50,
|
||||
filter: {
|
||||
title: '条件搜索',
|
||||
submitText: '',
|
||||
@ -163,8 +163,7 @@ const predefined = {
|
||||
},
|
||||
{
|
||||
type: 'html',
|
||||
html:
|
||||
'<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>'
|
||||
html: '<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user