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