|
|
|
@ -21,11 +21,12 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="60" |
|
|
|
:max-height="120" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
v-loading="this.dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
style="width: 100%;" |
|
|
|
:header-cell-style="{whiteSpace: 'nowrap', padding: '5px 0'}"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -37,14 +38,14 @@ |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="!item.columnHidden" @dblclick="startEditCell(scope.$index, item.columnProp, scope.row[item.columnProp])" style="min-height: 23px; cursor: pointer;" :title="editingCell.rowIndex === scope.$index && editingCell.columnProp === item.columnProp ? '' : '双击编辑,回车保存'"> |
|
|
|
<div v-if="!item.columnHidden" @dblclick="startEditCell(scope.$index, item.columnProp, scope.row[item.columnProp])" style="min-height: 23px; cursor: pointer;" :title="editingCell.rowIndex === scope.$index && editingCell.columnProp === item.columnProp ? '' : '双击编辑,点击其他地方保存'"> |
|
|
|
<el-input |
|
|
|
v-if="editingCell.rowIndex === scope.$index && editingCell.columnProp === item.columnProp" |
|
|
|
v-model="editingCell.value" |
|
|
|
size="small" |
|
|
|
ref="editInput" |
|
|
|
:disabled="editingCell.isSaving" |
|
|
|
@keyup.enter.native="saveEditCell(scope.$index, item.columnProp, item.columnLabel)" |
|
|
|
@blur="saveEditCell(scope.$index, item.columnProp, item.columnLabel)" |
|
|
|
@keyup.esc.native="cancelEditCell" |
|
|
|
style="width: 100%;"> |
|
|
|
</el-input> |
|
|
|
|