1. 程式人生 > 其它 >el-table 資料巢狀迴圈

el-table 資料巢狀迴圈

 <el-table :data="tableData"     :show-header="false"     style="width: 100%">     <el-table-column       label="標籤組"       width="140" >        <template slot-scope="scope">         <span><b>{{ scope.row.groupName }}</b></span>         <span></span>       </template>     </el-table-column>
          <el-table-column       label="標籤許可權及內容" >       <template slot-scope="scope">            <p>使用許可權: {{ scope.row.tagPower === 0 ? '所有員工' : '部門許可權 ' }}</p>            <el-tag v-for="(item, index) in scope.row.infolist">              <span>{{item.tagName}}</span>            </el-tag>       </template>     </el-table-column>
    <el-table-column label="操作"  width="300">       <template slot-scope="scope">           <el-button           size="mini"           @click="handleEdit(scope.$index, scope.row)">上移</el-button>           <el-button           size="mini"           @click="handleEdit(scope.$index, scope.row)">下移</el-button>         <el-button           size="mini"           @click="handleEdit(scope.$index, scope.row)">編輯</el-button>         <el-button           size="mini"           type="danger"           @click="handleDelete(scope.$index, scope.row)">刪除</el-button>       </template>     </el-table-column>   </el-table>