mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +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 BORDER = 2;
|
||||
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;
|
||||
// 计算 toolbar 的上/下位置
|
||||
if (observed.top > SPACE_HEIGHT) {
|
||||
|
||||
@ -85,6 +85,7 @@ class Content extends Component<{ host: BuiltinSimulatorHost }> {
|
||||
return (
|
||||
<div className="lc-simulator-content">
|
||||
<iframe
|
||||
name="SimulatorRenderer"
|
||||
className="lc-simulator-content-frame"
|
||||
style={frameStyle}
|
||||
ref={(frame) => sim.mountContentFrame(frame)}
|
||||
|
||||
@ -124,7 +124,7 @@ export class SettingTopEntry implements SettingEntry {
|
||||
* 获取当前属性值
|
||||
*/
|
||||
@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 === false || canDropto === false) {
|
||||
nestingRule.parentWhitelist = () => false;
|
||||
}
|
||||
if (canDropTo !== true && canDropto !== true) {
|
||||
} else if (canDropTo !== true && canDropto !== true) {
|
||||
nestingRule.parentWhitelist = canDropTo || canDropto;
|
||||
}
|
||||
}
|
||||
if (canDropIn != null || canDroping != null) {
|
||||
if (canDropIn === false || canDroping === false) {
|
||||
nestingRule.childWhitelist = () => false;
|
||||
}
|
||||
if (canDropIn !== true && canDroping !== true) {
|
||||
} else if (canDropIn !== true && canDroping !== true) {
|
||||
nestingRule.childWhitelist = canDropIn || canDroping;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user