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