Element-ui 里面ID如何獲取


如果你遇到了表格中按鈕需要id的,就往下看吧

<el-table-column
  label="操作">

  <template slot-scope="scope">
    <el-button type="primary" @click="Update(scope.row.id)" >修改</el-button>
    <el-button type="danger" @click="Del(scope.row.id)">刪除</el-button>
  </template>
</el-table-column>

scope.row.id 獲取本條數據的ID

scope.row 獲取本條數據

 


免責聲明!

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



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