主要通过设置rowspan和display:none属性来实现合并行的功能 <table id="table" rules="all" border="1" cellspacing="1" cellpadding="1" class="table-box"> <thead> <tr style="background: #ddd;"> <th>单位</th> <th>类型</th> <th>岗位</th> <th>时间</th> <th>人员</th> </tr> </thead> <tbody> <tr v-for="(item, index) in resultList" :key="index"> <td :rowspan="item.orgNameSpan" :class="{'no-show-td': item.orgNameDis}">{ { item.orgName }}</td> <td :rowspan="item.dutyTypeNameSpan" :class="{'no-show-td': item.dutyTypeNameDis}">{ { item.dutyTypeName}}</td> <td :rowspan="item.jobNameSpan" :class="{'no-show-td': item.jobNameDi
vue 通过原生table合并单元行
最新推荐文章于 2023-08-08 11:29:46 发布