1
0
mirror of synced 2026-04-03 06:28:35 +08:00

fix(editor,stage,ui,runtime): 流式布局下,height自动设置成auto

fix #298
This commit is contained in:
roymondchen
2022-08-30 17:37:39 +08:00
committed by jia000
parent 9e167474a2
commit 2201fbe80c
19 changed files with 163 additions and 63 deletions

View File

@@ -26,5 +26,16 @@ export default [
{ value: 'absolute', text: '绝对定位' },
{ value: 'relative', text: '流式布局' },
],
onChange: (formState: any, v: string, { model }: any) => {
if (!model.style) return v;
if (v === 'relative') {
model.style.height = 'auto';
} else {
const el = formState.stage?.renderer?.contentWindow.document.getElementById(model.id);
if (el) {
model.style.height = el.getBoundingClientRect().height;
}
}
},
},
];