el-popover自定义类名添加样式和手动关闭
<el-popover
popper-class="popver_account"
style="padding-right: 0px !important;"
ref="popover" placement="bottom" width="260" trigger="click">
<div class="account_list"></div>
<div slot="reference" style="cursor: pointer;font-size: 18px;">
切换账号<i class="el-icon-arrow-down"></i>
</div>
</el-popover>
1.popper-class 自定义类名 在全局的style里面直接写
<style>
.popver_account {
padding-right: 2px !important;
}
</style>
2.ref=“popover” 绑定ref是可以实现 手动控制控制popver的显示和隐藏 doClose()关闭 doShow() 打开 doDestroy销毁popover
this.$refs.popover.doClose()