要素uiは、テーブル内のチェックされたデータを取得します


次のようにフォームに参照参照コードが必要です

<template>
  <div class="app-container systemModule">
        <el-table
          :data="tableData"
          border
          ref="multipleTable"
          style="width: 100%;margin-top:15px"
          :row-class-name="tableRowClassName"
        >
            <el-table-column
                type="selection"
                width="55">
            </el-table-column>
            <el-table-column prop="name" label="名称"></el-table-column>
        </el-table>
  </div>

</template>
<script>
export default {
     
     
    data(){
     
     
        return {
     
     
            tableData: [
                {
     
     
                    id: 1,
                    name: "定标定期无线管理"
                },
                {
     
     
                    id: 2,
                    name: "定标定期无线管理"
                }
            ]
        }
    }
}
</script>

refをmultipleTableとして定義する
と、multipleTableを使用して、選択したすべてのデータを取得
し、メソッドで実行できます。

 this.$refs.multipleTable.selection;

$refs.multipleTableをここに直接コピーしないでください
。これはテーブルに定義したref属性に基づいています。

おすすめ

転載: blog.csdn.net/weixin_45966674/article/details/123405255