mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-18 21:38:14 +00:00
chore: 修改代码样式
This commit is contained in:
parent
9f051c62ed
commit
94b9aa7037
@ -28,6 +28,6 @@ module.exports = {
|
|||||||
'eol-last': 0,
|
'eol-last': 0,
|
||||||
'react/no-find-dom-node': 0,
|
'react/no-find-dom-node': 0,
|
||||||
'no-case-declarations': 0,
|
'no-case-declarations': 0,
|
||||||
'@typescript-eslint/indent': 0,
|
'@typescript-eslint/indent': 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -321,22 +321,20 @@ export class Designer {
|
|||||||
target: activedDoc.rootNode as ParentalNode,
|
target: activedDoc.rootNode as ParentalNode,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const focusNode = activedDoc.focusNode;
|
const focusNode = activedDoc.focusNode!;
|
||||||
const nodes = activedDoc.selection.getNodes();
|
const nodes = activedDoc.selection.getNodes();
|
||||||
const refNode = nodes.find(item => focusNode.contains(item));
|
const refNode = nodes.find(item => focusNode.contains(item));
|
||||||
let target;
|
let target;
|
||||||
let index: number | undefined;
|
let index: number | undefined;
|
||||||
if (!refNode || refNode === focusNode) {
|
if (!refNode || refNode === focusNode) {
|
||||||
target = focusNode;
|
target = focusNode;
|
||||||
} else {
|
} else if (refNode.componentMeta.isContainer) {
|
||||||
if (refNode.componentMeta.isContainer) {
|
|
||||||
target = refNode;
|
target = refNode;
|
||||||
} else {
|
} else {
|
||||||
// FIXME!!, parent maybe null
|
// FIXME!!, parent maybe null
|
||||||
target = refNode.parent!;
|
target = refNode.parent!;
|
||||||
index = refNode.index + 1;
|
index = refNode.index + 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (target && insertNode && !target.componentMeta.checkNestingDown(target, insertNode)) {
|
if (target && insertNode && !target.componentMeta.checkNestingDown(target, insertNode)) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
PluginClassSet,
|
PluginClassSet,
|
||||||
KeyType,
|
KeyType,
|
||||||
GetReturnType,
|
GetReturnType,
|
||||||
HookConfig
|
HookConfig,
|
||||||
} from '@ali/lowcode-types';
|
} from '@ali/lowcode-types';
|
||||||
import { globalLocale } from './intl';
|
import { globalLocale } from './intl';
|
||||||
import * as utils from './utils';
|
import * as utils from './utils';
|
||||||
@ -156,6 +156,7 @@ export class Editor extends EventEmitter implements IEditor {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
private waits = new Map<
|
private waits = new Map<
|
||||||
KeyType,
|
KeyType,
|
||||||
Array<{
|
Array<{
|
||||||
@ -163,6 +164,7 @@ export class Editor extends EventEmitter implements IEditor {
|
|||||||
resolve: (data: any) => void;
|
resolve: (data: any) => void;
|
||||||
}>
|
}>
|
||||||
>();
|
>();
|
||||||
|
/* eslint-enable */
|
||||||
|
|
||||||
private notifyGot(key: KeyType) {
|
private notifyGot(key: KeyType) {
|
||||||
let waits = this.waits.get(key);
|
let waits = this.waits.get(key);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user