mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 20:48:49 +08:00
feat: flex布局容器增加定位、inset、z-index等配置项
Change-Id: I0b55c40344cdee00b6c076625f5db2f910f30191
This commit is contained in:
parent
2ffbad35a4
commit
dbc363828c
@ -959,6 +959,20 @@ export class EditorManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前元素是否为flex布局子容器
|
||||
* 备注: 以便额外增加布局相关配置项
|
||||
*/
|
||||
isFlexItem(id: string) {
|
||||
const store = this.store;
|
||||
const activeId = id || store.activeId;
|
||||
const parentSchema = store.getSchemaParentById(activeId);
|
||||
if (parentSchema?.type === 'flex') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入口在 Preview 里面,用来获取渲染器对应的编辑器信息。
|
||||
* 拿到这些信息后会在渲染原本渲染器的地方包一层,并创建高亮框在点选或者 hover 的时候显示。
|
||||
|
@ -366,7 +366,7 @@ export const EditorStore = types
|
||||
getSchemaParentById(id: string) {
|
||||
return JSONGetParentById(self.schema, id);
|
||||
},
|
||||
|
||||
|
||||
getSchemaPath(id: string): string {
|
||||
const paths = JSONGetPathById(self.schema, id);
|
||||
return Array.isArray(paths) ? paths.join('/') : '';
|
||||
|
Loading…
Reference in New Issue
Block a user