mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 05:48:17 +00:00
fix: 修复 canDropIn / canDropTo 转成 nestingRule 异常
fix: 修复部分场景下 bem-tools 选择框位置不对 chore: 命名 iframe 为 SimulatorRenderer, 方便调试
This commit is contained in:
parent
a409348cb7
commit
6406417e73
@ -73,7 +73,7 @@ class Toolbar extends Component<{ observed: OffsetObserver }> {
|
|||||||
const MARGIN = 1;
|
const MARGIN = 1;
|
||||||
const BORDER = 2;
|
const BORDER = 2;
|
||||||
const SPACE_HEIGHT = BAR_HEIGHT + MARGIN + BORDER;
|
const SPACE_HEIGHT = BAR_HEIGHT + MARGIN + BORDER;
|
||||||
const SPACE_MINIMUM_WIDTH = 140; // magic number
|
const SPACE_MINIMUM_WIDTH = 160; // magic number,大致是 toolbar 的宽度
|
||||||
let style: any;
|
let style: any;
|
||||||
// 计算 toolbar 的上/下位置
|
// 计算 toolbar 的上/下位置
|
||||||
if (observed.top > SPACE_HEIGHT) {
|
if (observed.top > SPACE_HEIGHT) {
|
||||||
|
|||||||
@ -85,6 +85,7 @@ class Content extends Component<{ host: BuiltinSimulatorHost }> {
|
|||||||
return (
|
return (
|
||||||
<div className="lc-simulator-content">
|
<div className="lc-simulator-content">
|
||||||
<iframe
|
<iframe
|
||||||
|
name="SimulatorRenderer"
|
||||||
className="lc-simulator-content-frame"
|
className="lc-simulator-content-frame"
|
||||||
style={frameStyle}
|
style={frameStyle}
|
||||||
ref={(frame) => sim.mountContentFrame(frame)}
|
ref={(frame) => sim.mountContentFrame(frame)}
|
||||||
|
|||||||
@ -124,7 +124,7 @@ export class SettingTopEntry implements SettingEntry {
|
|||||||
* 获取当前属性值
|
* 获取当前属性值
|
||||||
*/
|
*/
|
||||||
@computed getValue(): any {
|
@computed getValue(): any {
|
||||||
this.first.propsData;
|
return this.first?.propsData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -688,16 +688,14 @@ export function upgradeMetadata(oldConfig: OldPrototypeConfig) {
|
|||||||
if (canDropTo != null || canDropto != null) {
|
if (canDropTo != null || canDropto != null) {
|
||||||
if (canDropTo === false || canDropto === false) {
|
if (canDropTo === false || canDropto === false) {
|
||||||
nestingRule.parentWhitelist = () => false;
|
nestingRule.parentWhitelist = () => false;
|
||||||
}
|
} else if (canDropTo !== true && canDropto !== true) {
|
||||||
if (canDropTo !== true && canDropto !== true) {
|
|
||||||
nestingRule.parentWhitelist = canDropTo || canDropto;
|
nestingRule.parentWhitelist = canDropTo || canDropto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (canDropIn != null || canDroping != null) {
|
if (canDropIn != null || canDroping != null) {
|
||||||
if (canDropIn === false || canDroping === false) {
|
if (canDropIn === false || canDroping === false) {
|
||||||
nestingRule.childWhitelist = () => false;
|
nestingRule.childWhitelist = () => false;
|
||||||
}
|
} else if (canDropIn !== true && canDroping !== true) {
|
||||||
if (canDropIn !== true && canDroping !== true) {
|
|
||||||
nestingRule.childWhitelist = canDropIn || canDroping;
|
nestingRule.childWhitelist = canDropIn || canDroping;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user