chore: 修改代码样式

This commit is contained in:
lihao.ylh 2021-07-29 14:24:12 +08:00
parent 9f051c62ed
commit 94b9aa7037
3 changed files with 15 additions and 15 deletions

View File

@ -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
}
};

View File

@ -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)) {

View File

@ -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);