41 lines
		
	
	
		
			781 B
		
	
	
	
		
			Vue
		
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			781 B
		
	
	
	
		
			Vue
		
	
	
| <docs>
 | ||
| ---
 | ||
| order: 8
 | ||
| title:
 | ||
|   zh-CN: 右键菜单
 | ||
|   en-US: Context Menu
 | ||
| ---
 | ||
| 
 | ||
| ## zh-CN
 | ||
| 
 | ||
| 默认是移入触发菜单,可以点击鼠标右键触发。
 | ||
| 
 | ||
| ## en-US
 | ||
| 
 | ||
| The default trigger mode is `hover`, you can change it to `contextMenu`.
 | ||
| 
 | ||
| </docs>
 | ||
| 
 | ||
| <template>
 | ||
|   <a-dropdown :trigger="['contextmenu']">
 | ||
|     <div
 | ||
|       :style="{
 | ||
|         textAlign: 'center',
 | ||
|         background: '#f7f7f7',
 | ||
|         height: '200px',
 | ||
|         lineHeight: '200px',
 | ||
|         color: '#777',
 | ||
|       }"
 | ||
|     >
 | ||
|       Right Click on here
 | ||
|     </div>
 | ||
|     <template #overlay>
 | ||
|       <a-menu>
 | ||
|         <a-menu-item key="1">1st menu item</a-menu-item>
 | ||
|         <a-menu-item key="2">2nd menu item</a-menu-item>
 | ||
|         <a-menu-item key="3">3rd menu item</a-menu-item>
 | ||
|       </a-menu>
 | ||
|     </template>
 | ||
|   </a-dropdown>
 | ||
| </template>
 |