mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-22 17:38:12 +00:00
feat: 低成本方案支持绝对布局容器
This commit is contained in:
parent
f366abcdf7
commit
a6067e8d74
@ -123,6 +123,11 @@ export class InsertionView extends Component<{ host: BuiltinSimulatorHost }> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果是个绝对定位容器,不需要渲染插入标记
|
||||||
|
if (loc.target.componentMeta.getMetadata().experimental?.isAbsoluteLayoutContainer) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const { scale, scrollX, scrollY } = host.viewport;
|
const { scale, scrollX, scrollY } = host.viewport;
|
||||||
const { edge, insertType, coverRect, nearRect, vertical } = processDetail(loc);
|
const { edge, insertType, coverRect, nearRect, vertical } = processDetail(loc);
|
||||||
|
|
||||||
|
|||||||
@ -136,6 +136,7 @@ export interface OldPrototypeConfig {
|
|||||||
};
|
};
|
||||||
|
|
||||||
isContainer?: boolean; // => configure.component.isContainer
|
isContainer?: boolean; // => configure.component.isContainer
|
||||||
|
isAbsoluteLayoutContainer?: boolean; // => meta.experimental.isAbsoluteLayoutContainer 是否是绝对定位容器
|
||||||
isModal?: boolean; // => configure.component.isModal
|
isModal?: boolean; // => configure.component.isModal
|
||||||
isFloating?: boolean; // => configure.component.isFloating
|
isFloating?: boolean; // => configure.component.isFloating
|
||||||
descriptor?: string; // => configure.component.descriptor
|
descriptor?: string; // => configure.component.descriptor
|
||||||
@ -592,6 +593,7 @@ export function upgradeMetadata(oldConfig: OldPrototypeConfig) {
|
|||||||
configure,
|
configure,
|
||||||
transducers,
|
transducers,
|
||||||
isContainer,
|
isContainer,
|
||||||
|
isAbsoluteLayoutContainer,
|
||||||
rectSelector,
|
rectSelector,
|
||||||
isModal,
|
isModal,
|
||||||
isFloating,
|
isFloating,
|
||||||
@ -678,7 +680,9 @@ export function upgradeMetadata(oldConfig: OldPrototypeConfig) {
|
|||||||
component.nestingRule = nestingRule;
|
component.nestingRule = nestingRule;
|
||||||
|
|
||||||
// 未考虑清楚的,放在实验性段落
|
// 未考虑清楚的,放在实验性段落
|
||||||
const experimental: any = {};
|
const experimental: any = {
|
||||||
|
isAbsoluteLayoutContainer,
|
||||||
|
};
|
||||||
if (context) {
|
if (context) {
|
||||||
// for prototype.getContextInfo
|
// for prototype.getContextInfo
|
||||||
experimental.context = context;
|
experimental.context = context;
|
||||||
|
|||||||
@ -65,6 +65,7 @@ export interface Experimental {
|
|||||||
autoruns?: AutorunItem[];
|
autoruns?: AutorunItem[];
|
||||||
callbacks?: Callbacks;
|
callbacks?: Callbacks;
|
||||||
initialChildren?: NodeData[] | ((target: SettingTarget) => NodeData[]);
|
initialChildren?: NodeData[] | ((target: SettingTarget) => NodeData[]);
|
||||||
|
isAbsoluteLayoutContainer: boolean;
|
||||||
|
|
||||||
// 样式 及 位置,handle上必须有明确的标识以便事件路由判断,或者主动设置事件独占模式
|
// 样式 及 位置,handle上必须有明确的标识以便事件路由判断,或者主动设置事件独占模式
|
||||||
// NWSE 是交给引擎计算放置位置,ReactElement 必须自己控制初始位置
|
// NWSE 是交给引擎计算放置位置,ReactElement 必须自己控制初始位置
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user