el-popconfirm与el-tooltip同时使用
代码
<el-popconfirm confirmButtonText="确定" cancelButtonText="取消" icon="el-icon-info" iconColor="red" title="确定删除?" @confirm="handleDelete(scope.row.id)" :disabled="scope.row.builtinFlag == 1" > <template #reference> <div> <el-tooltip class="item" effect="dark" content="删除" placement="top" :enterable="false" > <delete-outlined :class="{ 'xxx-btn-denger': !(scope.row.builtinFlag == 1), 'xxx-btn-disabled': scope.row.builtinFlag == 1, }" /> </el-tooltip> </div> </template> </el-popconfirm>
问题:
1、popconfirm 的触发元素是 必须有一层 div,否则达不到效果