fix: 兼容modal模式

This commit is contained in:
荣彬 2020-08-14 16:35:37 +08:00
parent 7c9dc0495b
commit 1092ee9fc8
3 changed files with 8 additions and 9 deletions

View File

@ -150,17 +150,16 @@ export class ComponentMeta {
this._title = this._title =
typeof title === 'string' typeof title === 'string'
? { ? {
type: 'i18n', type: 'i18n',
'en-US': this.componentName, 'en-US': this.componentName,
'zh-CN': title, 'zh-CN': title,
} }
: title; : title;
} }
const liveTextEditing = this._transformedMetadata.experimental?.liveTextEditing || []; const liveTextEditing = this._transformedMetadata.experimental?.liveTextEditing || [];
function collectLiveTextEditing(items: FieldConfig[]) { function collectLiveTextEditing(items: FieldConfig[]) {
debugger;
items.forEach((config) => { items.forEach((config) => {
if (config?.items) { if (config?.items) {
collectLiveTextEditing(config.items); collectLiveTextEditing(config.items);

View File

@ -39,7 +39,6 @@ function propTypeToSetter(propType: PropType): SetterType {
} else { } else {
typeName = 'string'; typeName = 'string';
} }
debugger;
// TODO: use mixinSetter wrapper // TODO: use mixinSetter wrapper
switch (typeName) { switch (typeName) {
case 'string': case 'string':

View File

@ -36,11 +36,11 @@ export class OutlineMain implements ISensor, ITreeBoard, IScrollable {
} }
readonly id = uniqueId('outline'); readonly id = uniqueId('outline');
@obx.ref _visible: boolean = false; @obx.ref _visible = false;
get visible() { get visible() {
return this._visible; return this._visible;
} }
constructor(readonly editor: IEditor, readonly at: string | Symbol) { constructor(readonly editor: IEditor, readonly at: string | symbol) {
let inited = false; let inited = false;
const setup = async () => { const setup = async () => {
if (inited) { if (inited) {
@ -135,7 +135,8 @@ export class OutlineMain implements ISensor, ITreeBoard, IScrollable {
const irect = this.getInsertionRect(); const irect = this.getInsertionRect();
const originLoc = document.dropLocation; const originLoc = document.dropLocation;
if (e.dragObject.type === 'node' && e.dragObject.nodes[0].getPrototype().isModal()) { const prop = e.dragObject.nodes[0].getPrototype();
if (e.dragObject.type === 'node' && prop && prop.isModal()) {
return designer.createLocation({ return designer.createLocation({
target: document.rootNode, target: document.rootNode,
detail: { detail: {