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 =
typeof title === 'string'
? {
type: 'i18n',
'en-US': this.componentName,
'zh-CN': title,
}
type: 'i18n',
'en-US': this.componentName,
'zh-CN': title,
}
: title;
}
const liveTextEditing = this._transformedMetadata.experimental?.liveTextEditing || [];
function collectLiveTextEditing(items: FieldConfig[]) {
debugger;
items.forEach((config) => {
if (config?.items) {
collectLiveTextEditing(config.items);

View File

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

View File

@ -36,11 +36,11 @@ export class OutlineMain implements ISensor, ITreeBoard, IScrollable {
}
readonly id = uniqueId('outline');
@obx.ref _visible: boolean = false;
@obx.ref _visible = false;
get visible() {
return this._visible;
}
constructor(readonly editor: IEditor, readonly at: string | Symbol) {
constructor(readonly editor: IEditor, readonly at: string | symbol) {
let inited = false;
const setup = async () => {
if (inited) {
@ -135,7 +135,8 @@ export class OutlineMain implements ISensor, ITreeBoard, IScrollable {
const irect = this.getInsertionRect();
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({
target: document.rootNode,
detail: {