Similar to Tooltip, Popover is also built with `Vue-popper`. So for some duplicated attributes, please refer to the documentation of Tooltip.
Similar to Tooltip, Popover is also built with `Vue-popper`. So for some duplicated attributes, please refer to the documentation of Tooltip.
:::demo Add `ref` in your popover, then in your button, use `v-popover` directive to link the button and the popover. The attribute `trigger` is used to define how popover is triggered: `hover`, `click` or `focus`. Alternatively, you can specify reference using a named `slot`.
:::demo The `trigger` attribute is used to define how popover is triggered: `hover`, `click`, `focus` or `manual`. As for the triggering element, you can write it in two different ways: use the `slot="reference"` named slot, or use the `v-popover` directive and set it to Popover's `ref`.
```html
```html
<el-popover
<el-popover
ref="popover1"
placement="top-start"
placement="top-start"
title="Title"
title="Title"
width="200"
width="200"
trigger="hover"
trigger="hover"
content="this is content, this is content, this is content">
content="this is content, this is content, this is content">
<el-buttonslot="reference">Hover to activate</el-button>
</el-popover>
</el-popover>
<el-popover
<el-popover
ref="popover2"
placement="bottom"
placement="bottom"
title="Title"
title="Title"
width="200"
width="200"
trigger="click"
trigger="click"
content="this is content, this is content, this is content">
content="this is content, this is content, this is content">
<el-buttonslot="reference">Click to activate</el-button>
</el-popover>
</el-popover>
<el-buttonv-popover:popover1>Hover to activate</el-button>
<el-buttonv-popover:popover2>Click to activate</el-button>
<el-popover
<el-popover
ref="popover"
placement="right"
placement="right"
title="Title"
title="Title"
width="200"
width="200"
trigger="focus"
trigger="focus"
content="this is content, this is content, this is content">
content="this is content, this is content, this is content">
<el-buttonslot="reference">Focus to activate</el-button>
</el-popover>
</el-popover>
<el-buttonv-popover:popover>Focus to activate</el-button>
```
```
:::
:::
...
@@ -142,7 +142,6 @@ Other components can be nested in popover. Following is an example of nested tab
...
@@ -142,7 +142,6 @@ Other components can be nested in popover. Following is an example of nested tab
```html
```html
<el-popover
<el-popover
ref="popover4"
placement="right"
placement="right"
width="400"
width="400"
trigger="click">
trigger="click">
...
@@ -151,10 +150,9 @@ Other components can be nested in popover. Following is an example of nested tab
...
@@ -151,10 +150,9 @@ Other components can be nested in popover. Following is an example of nested tab
Similar a un Tooltip, Popover está construido con `Vue-popper`. Así que para atributos duplicados, por favor refiérase a la documentación de Tooltip.
Similar a un Tooltip, Popover está construido con `Vue-popper`. Así que para atributos duplicados, por favor refiérase a la documentación de Tooltip.
:::demo Agrega `ref` al popover, luego en el botón usa la directiva `v-popover` para asociar el botón y el popover. El atributo `trigger` es usado para definir como el popover se dispara: `hover`, `click` o `focus`. De manera alternativa puede especificar la referencia utilizando un [slot con nombre](https://vuejs.org/v2/guide/components.html#Named-Slots).
:::demo El atributo `trigger` es usado para definir como el popover se dispara: `hover`, `click`, `focus` o `manual`. As for the triggering element, you can write it in two different ways: use the `slot="reference"`[named slot](https://vuejs.org/v2/guide/components.html#Named-Slots), or use the `v-popover` directive and set it to Popover's `ref`.
```html
```html
<el-popover
<el-popover
ref="popover1"
placement="top-start"
placement="top-start"
title="Title"
title="Title"
width="200"
width="200"
trigger="hover"
trigger="hover"
content="this is content, this is content, this is content">
content="this is content, this is content, this is content">
<el-buttonslot="reference">Hover to activate</el-button>
</el-popover>
</el-popover>
<el-popover
<el-popover
ref="popover2"
placement="bottom"
placement="bottom"
title="Title"
title="Title"
width="200"
width="200"
trigger="click"
trigger="click"
content="this is content, this is content, this is content">
content="this is content, this is content, this is content">
<el-buttonslot="reference">Click to activate</el-button>
</el-popover>
</el-popover>
<el-buttonv-popover:popover1>Hover to activate</el-button>
<el-buttonv-popover:popover2>Click to activate</el-button>
<el-popover
<el-popover
ref="popover"
placement="right"
placement="right"
title="Title"
title="Title"
width="200"
width="200"
trigger="focus"
trigger="focus"
content="this is content, this is content, this is content">
content="this is content, this is content, this is content">
<el-buttonslot="reference">Focus to activate</el-button>
</el-popover>
</el-popover>
<el-buttonv-popover:popover>Focus to activate</el-button>
```
```
:::
:::
...
@@ -141,7 +140,6 @@ Otros componentes pueden anidarse dentro de popover. A continuación un ejemplo
...
@@ -141,7 +140,6 @@ Otros componentes pueden anidarse dentro de popover. A continuación un ejemplo
```html
```html
<el-popover
<el-popover
ref="popover4"
placement="right"
placement="right"
width="400"
width="400"
trigger="click">
trigger="click">
...
@@ -150,10 +148,9 @@ Otros componentes pueden anidarse dentro de popover. A continuación un ejemplo
...
@@ -150,10 +148,9 @@ Otros componentes pueden anidarse dentro de popover. A continuación un ejemplo