element ui 中的popover組件在table列表,使用時數據顯示問題




在列表數據中使用,點擊對應的查看按鈕,每一頁的最后一個無法正確彈出這個紅色框,別的都是正常的。
查看代碼:

下面代碼紅色部分為問題故障代碼,藍色部分為修改后的代碼,問題原因:

1,<el-button> 按鈕要放在 <el-popover> 標簽里面

2,v-popover:popover3  屬性換成 slot="reference"

問題修改成功!!!!

<el-table-column align="center" label="操作"  v-if=" userno == 'admin' || userno == '10121'" width="120">
<template  slot-scope="scope">
    <el-popover
      ref="popover1"
      placement="right"
      width="600"
      trigger="hover">
      <el-table :data="scope.row.userQuarterDTOList" class="table_cont">
        <el-table-column width="180px" :span="8" label="真實姓名" class="table_cont">
          <template  slot-scope="scope">
           <span>{{scope.row.realname}}</span>
          </template>
        </el-table-column>
        <el-table-column :span="8" label="工號"  width="180px"  >
          <template  slot-scope="scope">
            <span>{{scope.row.name}}</span>
          </template>
        </el-table-column>
        <el-table-column :span="8" label="考核分數"   width="180px" >
          <template  slot-scope="scope">
         <span>{{scope.row.sumScore}}</span>
          </template>
        </el-table-column>
      </el-table>
      <el-button slot="reference" size="small" type="success">點擊查看</el-button>
    </el-popover> 

  <el-button v-popover:popover1 size="small" type="success">點擊查看</el-button>
  </template>
</el-table-column>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM