element-UI el-popconfirm失效

133 阅读1分钟

elementUI popconfirm失效 原因是未包含在一个盒子内 里面if必须写在外部盒子上面不然失效

多次筛选后失效代码

        <el-popconfirm
        title="确定要审核通过该数据吗?"
        @confirm="handlePass(scope.row.id)"
      >
        <el-button
        v-if="scope.row.status === '0'"
          slot="reference"
          type="text"
          >通过</el-button
        >
      </el-popconfirm>
     
     修该过后的

修该过的

```<span   v-if="scope.row.status === '待审核'">
            <el-popconfirm
            title="确定要审核通过该数据吗?"
            @confirm="handlePass(scope.row.id)"
          >
            <el-button
              slot="reference"
              type="text"
              >通过</el-button
            >
          </el-popconfirm>
          </span>