How to click on the checkbox of vue to get the row data when selected

clipboard.png

Apr.02,2021

is this column data?


add an event to input

<template scope="scope">
     <div v-if="scope.row">
           <el-checkbox @change="getRow(scope.row)"  v-if="scope.row.platformUsername"></el-checkbox>
           <el-checkbox  disabled v-if="!scope.row.platformUsername"></el-checkbox>
     </div>
   </template>
                    
                    
                    
                    

I wonder if you are using the elementui form


the data for each row should be from v-for, right? Checkbox has a change event bound and an event is passed into the current object

<li v-for="todo in todos">
      <label>
        <input type="checkbox"
          v-on:change="toggle(todo)"
          v-bind:checked="todo.done">

        <del v-if="todo.done">
          {{ todo.text }}
        </del>
        <span v-else>
          {{ todo.text }}
        </span>
      </label>
    </li>
Menu