add stay-on-click prop to solve case of clicking user avatar in status popover
This commit is contained in:
parent
03e6c6b993
commit
d5bc825616
3 changed files with 36 additions and 4 deletions
|
|
@ -21,12 +21,22 @@
|
|||
:class="popoverClass || 'popover-default'"
|
||||
@mouseenter="onMouseenterContent"
|
||||
@mouseleave="onMouseleaveContent"
|
||||
@click="onClickContent"
|
||||
>
|
||||
<slot
|
||||
name="content"
|
||||
class="popover-inner"
|
||||
:close="hidePopover"
|
||||
/>
|
||||
<div
|
||||
v-if="stayOnClick && pinned"
|
||||
class="pinned-tooltip-icon popover popover-default"
|
||||
>
|
||||
<FAIcon
|
||||
icon="thumbtack"
|
||||
class="faint"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</teleport>
|
||||
|
|
@ -51,6 +61,17 @@
|
|||
box-shadow: var(--popupShadow);
|
||||
}
|
||||
|
||||
.pinned-tooltip-icon {
|
||||
position: absolute;
|
||||
top: -1em;
|
||||
left: -1em;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.popover-default {
|
||||
&:after {
|
||||
content: '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue