goclick(row,column,event,cell) { console.log(row,column,event,cell) } } 2.普通click点击事件 <template><el-table:data="tableData"style="width: 100%"><el-table-columnprop="date"label="日期"width="180"></el-table-column><el-table-columnprop="name"label="姓名"width="180"></el-tabl...
this.saveCellClick(row, cell) cell.querySelector('.item__txt').style.display = 'none' cell.querySelector('.item__input').style.display = 'block' cell.querySelector('textarea').focus() } }, 在点击cell的时候,记录下当前的列名以及当前行的rowindex。 通过x行x列,我们是完全可以定位到哪一...
this.saveCellClick(row, cell) cell.querySelector('.item__txt').style.display = 'none' cell.querySelector('.item__input').style.display = 'block' cell.querySelector('input').focus() } }, /** 取消编辑状态 */ cancelEditable (cell) { cell.querySelector('.item__txt').style.display...
<el-input v-if="scope.row.isEditCell"v-model="scope.row.hitch"placeholder="发生故障位置"@blur="cellBlur(scope.row,scope.column)"style="width:70%"ref="hitchRef"></el-input> <!-- <el-button v-if="scope.row.isEditCell"type="success"icon="el-icon-check"size="mini"@click="submit...
直接通过element的table组件中的cell-click和cell-dbclick监听表格事件,回调函数有四个参数row, column, cell, event,可以拿这些参数做相应的筛选,然后使用操作dom的方法添加input达到更改值的作用,贴上原生代码: <template> //表格也可以写成原生的table
@cell-click点击事件 <el-table :data="records" style="width: 100%" @cell-click="txidUrl"> <el-table-column prop="burnTime" label="时间" width="180"></el-table-column> <el-table-column prop="txid" :formatter="(row,column,cellValue,index) => {return ellipseText(cellValue);}" lab...
@cell-mouse-leave="handleCellLeave" @cell-click="handleCellClick" > <el-table-column prop="date" label="日期" width="180"> <el-input class="item__input" v-model="scope.row.date" placeholder="请输入内容"></el-input> {{scope.row.date}} </el-table-column...
使用@cell-click可以得到四个参数 参数顺序是row, column, cell, event 这里的column,其实是cell,得到的是该行的html元素 打印row[column.property]才有值 至于获取行列的索引,可以这样 <!--html--><el-table:cell-class-name="tableCellClassName"@cell-click="cellClick">...</el-table> ...
methods:{ handle(row,column,event,cell){ console.log(row) console.log(column) console.log(event) console.log(cell) } } 自己输出看看有用2 回复 iyunge 2016 发布于 2017-06-21 @cell-click=“fn()” 有用1 回复 bvcvb 12 发布于 2017-06-22 新手...
直接通过element的table组件中的cell-click和cell-dbclick监听表格事件,回调函数有四个参数row, column, cell, event,可以拿这些参数做相应的筛选,然后使用操作dom的方法添加input达到更改值的作用,贴上原生代码: 代码语言:javascript 复制 <template>//表格也可以写成原生的table<el-table:data="addPlanRoute"border ...