element table表格嵌套表格

最終效果圖
json數(shù)據(jù)
<div>
     <el-table 
        :data="projectList" 
         border 
        :show-header="false"
      >
        <el-table-column width="100px">
            <template slot-scope="scope">
               <div>{{scope.row.ItemTypeName}}</div>
            </template>
         </el-table-column>

         <el-table-column width="400px">
            <template slot-scope="scope">
             <!--第一種方法-->
             <!--<div v-for="(item,index) in scope.row.ViewItemLists">-->
                 <!--<div>{{item.item_name}}</div>-->
                 <!--<div>-->
                   <!--<el-button>原價10</el-button>-->
                   <!--<el-button>折扣價0</el-button>-->
                 <!--</div>-->
             <!--</div>-->

     
           <!--第二種方法-->
           <tr v-for="item in scope.row.ViewItemLists" style="width: 100%">
              <!--<template slot-scope="scope">-->
               <td width="70%">{{item.item_name}}</td>
               <td width="15%">原價10</td>
               <td width="15%">原價10</td>
                <!--<div style="border: #8c939d solid 1px">{{item.item_name}}</div>-->
                <!--<div style="border: #8c939d solid 1px">-->
                  <!--<el-button>原價10</el-button>-->
                  <!--<el-button>折扣價0</el-button>-->
                <!--</div>-->
              <!--</template>-->
            </tr>

          </template>
       </el-table-column>
    </el-table>
</div>
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容