element-ui table type=“expand“ 無內容時 不可展開


1.首航加入 :row-class-name="getRowClass"
<el-table :data='ofStudent' style="width-100%" :row-class-name="getRowClass">

2.表格詳情沒有內容隱藏箭頭

getRowClass(row) { if(row.row.promotionStudentVOSs.length === 0){ // promotionStudentVOSs是你子項的數組 key return 'row-expand-cover' } }

3.樣式隱藏

.row-expand-cover td .el-table__expand-icon{ visibility: hidden !important; }


免責聲明!

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



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