使用el-popover来做弹框:
滑动或点击元素要加插槽slot="reference"来展示弹框;
html
<el-popover
placement="top"
width="166"
trigger="hover"
popper-class="popover">
<div>
<div>
<div>
<i class="iconfont icon-lianjie-01"></i>
<span>输入链接</span>
</div>
<div>
<i class="iconfont icon-gerenkongjian"></i>
<span>个人空间</span>
</div>
</div>
<div slot="reference">
<i class="iconfont icon-shangchuan-copy"></i>
</div>
</div>
</el-popover>
去掉默认小三角和更改padding样式:
css
.popover {
padding: 14px 10px 17px 10px !important;
box-sizing: border-box !important;
border-radius: 8px !important;
}
.popover .popper__arrow {
display: none !important;
}