在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML5  C++  HTML/ vue 的checkbox如何點(diǎn)擊選中時(shí) 獲取 該行數(shù)據(jù)

vue 的checkbox如何點(diǎn)擊選中時(shí) 獲取 該行數(shù)據(jù)

clipboard.png

回答
編輯回答
瘋浪

每行的數(shù)據(jù)應(yīng)該是v-for出來(lái)的吧? checkbox 有個(gè)change事件 綁定一個(gè)事件 傳入當(dāng)前對(duì)象就行了

<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>
2017年6月19日 03:18
編輯回答
孤島

給input加一個(gè)事件

<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>
                    
                    
                    
                    

不知道你用的是不是elementui的表格

2017年3月18日 07:32
編輯回答
壞脾滊

該列數(shù)據(jù)嗎?

2017年6月23日 14:27