300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > ElementUI table组件 表格组件 单击单元格可编辑逻辑

ElementUI table组件 表格组件 单击单元格可编辑逻辑

时间:2020-10-03 13:22:00

相关推荐

ElementUI table组件 表格组件 单击单元格可编辑逻辑

ElementUI table组件,表格组件,单击单元格可编辑逻辑

1、表格部分

<el-table:data="seatDataFilter"@cell-click="changeSort"><template slot-scope="scope"><el-inputv-model="changeSortVal"v-if="scope.row.seen"@blur="confirmSort(scope.$index, scope.row)"@keyup.enter.native="$event.target.blur":autofocus="scope.row.seen"></el-input><spanclass="sort-styl"v-else>{{ scope.row.sort }}</span></template><el-table>

2、方法部分

changeSort (row, column) {if (column.label === '排序') {row.seen = truethis.changeSortVal = ''ElementMsg(this, 'info', `选中排序值:${row.sort}`)} else {ElementMsg(this, 'info', `当前位置没有人`)}},confirmSort (index, row) {row.seen = false}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。