This commit is contained in:
xuliangzhan
2019-09-07 17:41:02 +08:00
parent a047809d8a
commit 30bf892ffd
24 changed files with 155 additions and 142 deletions

View File

@@ -3291,6 +3291,19 @@ var _default2 = {
return this.$nextTick();
},
handleChangeCell: function handleChangeCell(evnt, params) {
var _this22 = this;
this.triggerValidate('blur').catch(function (e) {
return e;
}).then(function () {
_this22.handleActived(params, evnt).then(function () {
return _this22.triggerValidate('change');
}).catch(function (e) {
return e;
});
});
},
/**
* 列点击事件
@@ -3298,8 +3311,6 @@ var _default2 = {
* 如果是双击模式,则单击后选中状态
*/
triggerCellClickEvent: function triggerCellClickEvent(evnt, params) {
var _this22 = this;
var $el = this.$el,
highlightCurrentRow = this.highlightCurrentRow,
editStore = this.editStore,
@@ -3315,7 +3326,8 @@ var _default2 = {
_this$mouseConfig3 = this.mouseConfig,
mouseConfig = _this$mouseConfig3 === void 0 ? {} : _this$mouseConfig3;
var actived = editStore.actived;
var column = params.column,
var row = params.row,
column = params.column,
cell = params.cell; // 如果是展开行
if ((expandConfig.trigger === 'row' || column.type === 'expand' && expandConfig.trigger === 'cell') && !this.getEventTargetNode(evnt, $el, 'vxe-table--expanded').flag) {
@@ -3348,28 +3360,16 @@ var _default2 = {
if (!mouseConfig.checked) {
if (editConfig) {
if (!actived.args || cell !== actived.args.cell) {
if (editConfig.trigger === 'manual') {
if (actived.args && actived.row === row && column !== actived.column) {
this.handleChangeCell(evnt, params);
}
} else if (!actived.args || cell !== actived.args.cell) {
if (editConfig.trigger === 'click') {
this.triggerValidate('blur').catch(function (e) {
return e;
}).then(function () {
_this22.handleActived(params, evnt).then(function () {
return _this22.triggerValidate('change');
}).catch(function (e) {
return e;
});
});
this.handleChangeCell(evnt, params);
} else if (editConfig.trigger === 'dblclick') {
if (editConfig.mode === 'row' && actived.row === params.row) {
this.triggerValidate('blur').catch(function (e) {
return e;
}).then(function () {
_this22.handleActived(params, evnt).then(function () {
return _this22.triggerValidate('change');
}).catch(function (e) {
return e;
});
});
this.handleChangeCell(evnt, params);
} else {
this.handleSelected(params, evnt);
}

File diff suppressed because one or more lines are too long