
<el-table :data="tableList" @cell-click='getCell' :cell-class-name='getRowColumn'>
<el-table-column
prop="remark"
label="备注"
width="370">
<template slot-scope='scope'>
<el-input v-model='scope.row.remark' v-if='scope.row.index == tabRowIndex && scope.column.index == tabColumnIndex' @blur='inputBlur'></el-input>
<div v-else> {{scope.row.remark}}</div>
</template>
</el-table-column>
</el-table>
getCell (row, column, cell, event) {
this.tabRowIndex = row.index
this.tabColumnIndex = column.index
},
getRowColumn ({ row, column, rowIndex, columnIndex }) {
row.index = rowIndex
column.index = columnIndex
},
inputBlur () {
this.tabRowIndex = null
this.tabColumnIndex = ''
},
博客涉及Vue相关内容,包含Vue.js、JavaScript以及Element UI等信息技术领域元素。
9444

被折叠的 条评论
为什么被折叠?



