mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-13 23:20:15 +08:00
fix(editor): 组件树多选后右键点击不会变回单选
This commit is contained in:
parent
5e7a0a0c53
commit
af72d819fe
@ -145,8 +145,10 @@ const nodeClickHandler = () => {
|
|||||||
|
|
||||||
const contextmenuHandler = (event: MouseEvent) => {
|
const contextmenuHandler = (event: MouseEvent) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
const nodes = editorService?.get('nodes') || [];
|
||||||
nodeClickHandler();
|
if (nodes.length < 2 || !nodes.includes(props.data)) {
|
||||||
|
nodeClickHandler();
|
||||||
|
}
|
||||||
|
|
||||||
emit('node-contextmenu', event, props.data);
|
emit('node-contextmenu', event, props.data);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user