UNPKG

cloud-ui.vusion

Version:
134 lines (86 loc) 3.89 kB
<!-- 该 README.md 根据 api.yaml 和 docs/*.md 自动生成,为了方便在 GitHub 和 NPM 上查阅。如需修改,请查看源文件 --> # UPopupCombination 弹出框 - [API]() - [Props/Attrs](#propsattrs) - [Slots](#slots) - [Events](#events) - [Methods](#methods) **Feedback** 点击/鼠标移入元素,弹出气泡式的卡片浮层。 ## API ### Props/Attrs | Prop/Attr | Type | Options | Default | Description | | --------- | ---- | ------- | ------- | ----------- | | offset | string | | `'0'` | 弹出层偏移,如:'10', '10px 10px', '10% 10%', 第一个值表示水平偏移,第二个值表示垂直位移, 默认单位是`px` | | merge-borders | boolean | | `true` | 是否自动合并内外边框 | | title | string | | `'标题'` | 弹出框标题 | | placement | string | `[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]` | `'bottom-start'` | 弹出层的弹出方向 | | hide-delay | number | | `200` | 当触发方式为'悬浮'时,提示内容消失延迟时间,单位是毫秒(ms) | | follow-cursor | boolean | | `false` | | | display | string | `[object Object]`<br/>`[object Object]` | `'inline'` | | | ellipsis | boolean | | `false` | 文字过长是否省略显示。 | | trigger | string | `[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]`<br/>`[object Object]` | `'click'` | 弹出框的触发方式 | | opened.sync | boolean | | `false` | 弹出状态分为“True(弹出)/False(关闭)”,默认为“弹出” | | disabled | boolean | | `false` | 置灰显示,且禁止任何交互(焦点、点击、选择、输入等) | ### Slots #### (default) 自定义弹出的内容。 #### reference 弹出层触发节点。 ### Events #### @before-open 弹出前触发。 | Param | Type | Description | | ----- | ---- | ----------- | | $event | object | 自定义事件对象 | | $event.preventDefault | Function | 阻止弹出流程 | | senderVM | UPopup | 发送事件实例 | #### @open 弹出时触发。 | Param | Type | Description | | ----- | ---- | ----------- | | $event | | 空 | | senderVM | UPopup | 发送事件实例 | #### @before-close 隐藏前触发。 | Param | Type | Description | | ----- | ---- | ----------- | | $event | object | 自定义事件对象 | | $event.preventDefault | Function | 阻止隐藏流程 | | senderVM | UPopup | 发送事件实例 | #### @close 隐藏时触发。 | Param | Type | Description | | ----- | ---- | ----------- | | $event | | 空 | | senderVM | UPopup | 发送事件实例 | #### @before-toggle @deprecated | Param | Type | Description | | ----- | ---- | ----------- | #### @toggle @deprecated | Param | Type | Description | | ----- | ---- | ----------- | Methods #### open() 弹出实例。 | Param | Type | Default | Description | | ----- | ---- | ------- | ----------- | #### close() 关闭实例。 | Param | Type | Default | Description | | ----- | ---- | ------- | ----------- | #### toggle(opened?) 切换弹出/关闭状态。 | Param | Type | Default | Description | | ----- | ---- | ------- | ----------- | | opened? | boolean | | 可选。弹出/关闭状态 | #### update() 更新 popper 实例。参考 [Popper.update()](https://popper.js.org/popper-documentation.html#Popper.update)。 | Param | Type | Default | Description | | ----- | ---- | ------- | ----------- | #### scheduleUpdate() 在下次 UI 渲染时一块更新 popper 实例,比`update()`性能要好。参考 [Popper.scheduleUpdate()](https://popper.js.org/popper-documentation.html#Popper.scheduleUpdate)。 | Param | Type | Default | Description | | ----- | ---- | ------- | ----------- |