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