在弹框触发的方法里加上document.body.click() 即可
尝试了很多其他的方法都没用,只有这个解决了
完整代码:
<el-select
@change="sourceChange"
clearable
><el-optionv-for="option in list1":key="option.code":label="option.name":value="option.code"></el-option>
</el-select>sourceChange(){
document.body.click()//重点
}<el-table-column>
<template slot-scope="scope"><el-popoverwidth="450":ref="`popover-${scope.row.id}`"trigger="click"@show="checkAllowed(scope.row)"><span slot="reference" style="cursor: pointer;">{{scope.row.name}}</span><el-table:data="List"style="width: 100%"row-key="id"height="214px"><el-table-columnlabel="序号"width="45"type="index"></el-table-column></el-table></el-popover></template>
</el-table-column>