popper-class可以修改其样式。
写法:
<el-popover v-if="showNav === false" popper-class="el-popover-self"> <template #reference> <el-icon class="recorder_open"> <DArrowLeft style="color: #ffb814"/> </el-icon> </template> <div> <el-button class="text-ver">上传记录</el-button> <el-button class="text-ver">安装记录</el-button> </div> </el-popover>
<style lang="less"> .el-popover.el-popper.el-popover-self{ min-width: 20px!important; width: 20px!important; padding: 0; } </style>