Elementui表格獲取索引index用於v-for


Vue + Elementui

在<el-table-column>里獲取每一行表格的索引,從0開始自增:

slot-scope="scope" 和 scope.$index 配合就能獲取索引

<template slot-scope="scope">
    {{scope.%index}} <!--輸出索引-->
</template>

 


免責聲明!

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



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