效果图
解决
:append-to-body="false"
添加这个属性就可以了
<el-popover
v-model="item.contextmenuVisible"
placement="bottom-end"
:append-to-body="false"
trigger="click"
:visible-arrow="false"
@hide="item.contextBtnVisible = false"
>
<ul
@mouseover="item.contextBtnVisible = true"
@mouseleave="!item.contextmenuVisible?item.contextBtnVisible = false:null"
>
<li v-show="pageType === 'drafts'||pageType === 'error'||pageType === 'remove'" @click="handleTips(item,0)">删除</li>
<li v-show="pageType === 'loading'" @click="handleTips(item,1)">取消发布</li>
<li v-show="pageType === 'drafts'" @click="handleCopy(item,index)">复制</li>
<li v-show="pageType === 'remove'" @click="handleTips(item,2)">上架</li>
<li v-show="pageType === 'release'" @click="handleTips(item,3)">下架</li>
</ul>
<span slot="reference" @click.stop="clickContextmenu(index)">
<img alt="拓展" src="@/assets/images/icon-gengduocopy@2x.png" class="context-btn">
</span>
</el-popover>