feat: flex布局容器增加定位、inset、z-index等配置项

Change-Id: I0b55c40344cdee00b6c076625f5db2f910f30191
This commit is contained in:
wibetter 2022-06-23 17:24:18 +08:00
parent 2ffbad35a4
commit dbc363828c
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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('/') : '';