Vue + Elementui
在<el-table-column>里獲取每一行表格的索引,從0開始自增:
slot-scope="scope" 和 scope.$index 配合就能獲取索引
<template slot-scope="scope">
{{scope.%index}} <!--輸出索引-->
</template>
Vue + Elementui
在<el-table-column>里獲取每一行表格的索引,從0開始自增:
slot-scope="scope" 和 scope.$index 配合就能獲取索引
<template slot-scope="scope">
{{scope.%index}} <!--輸出索引-->
</template>
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。