You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/vc-trigger/index.md

161 lines
4.4 KiB

## API
### props
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>popupClassName</td>
<td>string</td>
<td></td>
<td>additional className added to popup</td>
</tr>
<tr>
<td>forceRender</td>
<td>boolean</td>
<td>false</td>
<td>whether render popup before first show</td>
</tr>
<tr>
<td>destroyPopupOnHide</td>
<td>boolean</td>
<td>false</td>
<td>whether destroy popup when hide</td>
</tr>
<tr>
<td>getPopupClassNameFromAlign</td>
<td>getPopupClassNameFromAlign(align: Object):String</td>
<td></td>
<td>additional className added to popup according to align</td>
</tr>
<tr>
<td>action</td>
<td>string[]</td>
<td>['hover']</td>
<td>which actions cause popup shown. enum of 'hover','click','focus','contextmenu'</td>
</tr>
<tr>
<td>mouseEnterDelay</td>
<td>number</td>
<td>0</td>
<td>delay time to show when mouse enter. unit: s.</td>
</tr>
<tr>
<td>mouseLeaveDelay</td>
<td>number</td>
<td>0.1</td>
<td>delay time to hide when mouse leave. unit: s.</td>
</tr>
<tr>
<td>popupStyle</td>
<td>Object</td>
<td></td>
<td>additional style of popup</td>
</tr>
<tr>
<td>prefixCls</td>
<td>String</td>
<td>rc-trigger-popup</td>
<td>prefix class name</td>
</tr>
<tr>
<td>popupTransitionName</td>
<td>String|Object</td>
<td></td>
<td>https://github.com/react-component/animate</td>
</tr>
<tr>
<td>maskTransitionName</td>
<td>String|Object</td>
<td></td>
<td>https://github.com/react-component/animate</td>
</tr>
<tr>
<td>mask</td>
<td>boolean</td>
<td>false</td>
<td>whether to support mask</td>
</tr>
<tr>
<td>maskClosable</td>
<td>boolean</td>
<td>true</td>
<td>whether to support click mask to hide</td>
</tr>
<tr>
<td>popupVisible</td>
<td>boolean</td>
<td></td>
<td>whether popup is visible</td>
</tr>
<tr>
<td>zIndex</td>
<td>number</td>
<td></td>
<td>popup's zIndex</td>
</tr>
<tr>
<td>defaultPopupVisible</td>
<td>boolean</td>
<td></td>
<td>whether popup is visible initially</td>
</tr>
<tr>
<td>popupAlign</td>
<td>Object: alignConfig of [dom-align](https://github.com/yiminghe/dom-align)</td>
<td></td>
<td>popup 's align config</td>
</tr>
<tr>
<td>getPopupContainer</td>
<td>getPopupContainer(): HTMLElement</td>
<td></td>
<td>function returning html node which will act as popup container</td>
</tr>
<tr>
<td>getDocument</td>
<td>getDocument(): HTMLElement</td>
<td></td>
<td>function returning document node which will be attached click event to close trigger</td>
</tr>
<tr>
<td>popupPlacement</td>
<td>string</td>
<td></td>
<td>use preset popup align config from builtinPlacements, can be merged by popupAlign prop</td>
</tr>
<tr>
<td>builtinPlacements</td>
<td>object</td>
<td></td>
<td>builtin placement align map. used by placement prop</td>
</tr>
<tr>
<td>popupVisibleChange</td>
<td>$emit</td>
<td></td>
<td>call when popup visible is changed</td>
</tr>
<tr>
<td>popupAlign</td>
<td>$emit</td>
<td></td>
<td>callback when popup node is aligned</td>
</tr>
<tr>
<td>popup</td>
<td>slot='popup'</td>
<td></td>
<td>popup content</td>
</tr>
</tbody>
</table>