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>


免責聲明!

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



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