element中 popconfirm与tooltip同时使用


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,否则达不到效果

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM