mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 02:11:56 +00:00
fix: 修复删除时,当前组件信息丢失问题
This commit is contained in:
parent
11917f1525
commit
3bd1248767
@ -328,16 +328,16 @@ function getKeyInfo(combination: string, action?: string): KeyInfo {
|
|||||||
* convention - prevent default and stop propogation on the event
|
* convention - prevent default and stop propogation on the event
|
||||||
*/
|
*/
|
||||||
function fireCallback(callback: HotkeyCallback, e: KeyboardEvent, combo?: string, sequence?: string): void {
|
function fireCallback(callback: HotkeyCallback, e: KeyboardEvent, combo?: string, sequence?: string): void {
|
||||||
if (callback(e, combo) === false) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
const editor = globalContext.get(Editor);
|
const editor = globalContext.get(Editor);
|
||||||
const designer = editor.get('designer');
|
const designer = editor.get('designer');
|
||||||
const node = designer?.currentSelection?.getNodes()?.[0];
|
const node = designer?.currentSelection?.getNodes()?.[0];
|
||||||
const npm = node?.componentMeta?.npm;
|
const npm = node?.componentMeta?.npm;
|
||||||
const selected =
|
const selected =
|
||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') || node?.componentMeta?.componentName || '';
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') || node?.componentMeta?.componentName || '';
|
||||||
|
if (callback(e, combo) === false) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
editor?.emit('hotkey.callback.call', {
|
editor?.emit('hotkey.callback.call', {
|
||||||
callback,
|
callback,
|
||||||
e,
|
e,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user