vxe-table 3.8.4 → 3.8.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/lib/edit/src/mixin.js +88 -82
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +93 -85
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/methods.js +13 -1
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +9 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +0 -6
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +0 -6
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/edit/src/mixin.js +79 -74
- package/packages/table/src/methods.js +12 -2
- package/packages/table/src/table.js +9 -9
- package/styles/table.scss +14 -14
- /package/lib/icon/style/{iconfont.1714486550546.ttf → iconfont.1714960961818.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1714486550546.woff → iconfont.1714960961818.woff} +0 -0
- /package/lib/icon/style/{iconfont.1714486550546.woff2 → iconfont.1714960961818.woff2} +0 -0
- /package/lib/{iconfont.1714486550546.ttf → iconfont.1714960961818.ttf} +0 -0
- /package/lib/{iconfont.1714486550546.woff → iconfont.1714960961818.woff} +0 -0
- /package/lib/{iconfont.1714486550546.woff2 → iconfont.1714960961818.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -11346,7 +11346,7 @@ var es_array_concat = __webpack_require__(8706);
|
|
|
11346
11346
|
|
|
11347
11347
|
|
|
11348
11348
|
function getLog(message, params) {
|
|
11349
|
-
return "[vxe-table v".concat("3.8.
|
|
11349
|
+
return "[vxe-table v".concat("3.8.5-beta.0", "] ").concat(conf.i18n(message, params));
|
|
11350
11350
|
}
|
|
11351
11351
|
function outLog(type) {
|
|
11352
11352
|
return function (message, params) {
|
|
@@ -13067,7 +13067,7 @@ var setup = config;
|
|
|
13067
13067
|
var globalStore = {};
|
|
13068
13068
|
var VXETable = {
|
|
13069
13069
|
v: v,
|
|
13070
|
-
version: "3.8.
|
|
13070
|
+
version: "3.8.5-beta.0",
|
|
13071
13071
|
reg: reg,
|
|
13072
13072
|
use: use,
|
|
13073
13073
|
setup: setup,
|
|
@@ -16547,6 +16547,8 @@ var Cell = {
|
|
|
16547
16547
|
|
|
16548
16548
|
|
|
16549
16549
|
|
|
16550
|
+
|
|
16551
|
+
|
|
16550
16552
|
|
|
16551
16553
|
|
|
16552
16554
|
|
|
@@ -19248,6 +19250,7 @@ var Methods = {
|
|
|
19248
19250
|
// 兼容老版本
|
|
19249
19251
|
if (!evntList.length && type === 'event.clearEdit') {
|
|
19250
19252
|
evntList = v_x_e_table.interceptor.get('event.clearActived');
|
|
19253
|
+
if (false) {}
|
|
19251
19254
|
}
|
|
19252
19255
|
// 兼容老版本
|
|
19253
19256
|
|
|
@@ -21020,11 +21023,13 @@ var Methods = {
|
|
|
21020
21023
|
radioOpts = this.radioOpts,
|
|
21021
21024
|
expandOpts = this.expandOpts,
|
|
21022
21025
|
treeOpts = this.treeOpts,
|
|
21026
|
+
keyboardOpts = this.keyboardOpts,
|
|
21023
21027
|
editConfig = this.editConfig,
|
|
21024
21028
|
editOpts = this.editOpts,
|
|
21025
21029
|
checkboxOpts = this.checkboxOpts,
|
|
21026
21030
|
rowOpts = this.rowOpts;
|
|
21027
|
-
var actived = editStore.actived
|
|
21031
|
+
var actived = editStore.actived,
|
|
21032
|
+
focused = editStore.focused;
|
|
21028
21033
|
var _params = params,
|
|
21029
21034
|
row = _params.row,
|
|
21030
21035
|
column = _params.column;
|
|
@@ -21075,6 +21080,11 @@ var Methods = {
|
|
|
21075
21080
|
}
|
|
21076
21081
|
// 如果设置了单元格选中功能,则不会使用点击事件去处理(只能支持双击模式)
|
|
21077
21082
|
if (isEnableConf(editConfig)) {
|
|
21083
|
+
// 记录点击输入框聚焦状态
|
|
21084
|
+
if (keyboardOpts.arrowCursorLock && evnt && editOpts.mode === 'cell' && evnt.target && /^input|textarea$/i.test(evnt.target.tagName)) {
|
|
21085
|
+
focused.column = column;
|
|
21086
|
+
focused.row = row;
|
|
21087
|
+
}
|
|
21078
21088
|
if (editOpts.trigger === 'manual') {
|
|
21079
21089
|
if (actived.args && actived.row === row && column !== actived.column) {
|
|
21080
21090
|
this.handleChangeCell(evnt, params);
|
|
@@ -25630,94 +25640,100 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25630
25640
|
editConfig = this.editConfig,
|
|
25631
25641
|
mouseConfig = this.mouseConfig;
|
|
25632
25642
|
var mode = editOpts.mode;
|
|
25633
|
-
var actived = editStore.actived
|
|
25643
|
+
var actived = editStore.actived,
|
|
25644
|
+
focused = editStore.focused;
|
|
25634
25645
|
var row = params.row,
|
|
25635
25646
|
column = params.column;
|
|
25636
25647
|
var editRender = column.editRender;
|
|
25637
25648
|
var cell = params.cell = params.cell || this.getCell(row, column);
|
|
25638
25649
|
var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
25639
|
-
if (isEnableConf(editConfig) && isEnableConf(editRender)
|
|
25640
|
-
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
|
|
25644
|
-
|
|
25645
|
-
|
|
25646
|
-
|
|
25650
|
+
if (cell && isEnableConf(editConfig) && isEnableConf(editRender)) {
|
|
25651
|
+
// 激活编辑
|
|
25652
|
+
if (!this.hasPendingByRow(row)) {
|
|
25653
|
+
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
25654
|
+
// 判断是否禁用编辑
|
|
25655
|
+
var type = 'edit-disabled';
|
|
25656
|
+
if (!beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
25657
|
+
$table: this,
|
|
25658
|
+
$grid: this.$xegrid
|
|
25659
|
+
}))) {
|
|
25660
|
+
if (mouseConfig) {
|
|
25661
|
+
this.clearSelected(evnt);
|
|
25662
|
+
this.clearCellAreas(evnt);
|
|
25663
|
+
this.clearCopyCellArea(evnt);
|
|
25664
|
+
}
|
|
25665
|
+
this.closeTooltip();
|
|
25666
|
+
if (actived.column) {
|
|
25667
|
+
this.clearEdit(evnt);
|
|
25668
|
+
}
|
|
25669
|
+
type = 'edit-activated';
|
|
25670
|
+
column.renderHeight = cell.offsetHeight;
|
|
25671
|
+
actived.args = params;
|
|
25672
|
+
actived.row = row;
|
|
25673
|
+
actived.column = column;
|
|
25674
|
+
if (mode === 'row') {
|
|
25675
|
+
tableColumn.forEach(function (column) {
|
|
25676
|
+
return _this6._getColumnModel(row, column);
|
|
25677
|
+
});
|
|
25678
|
+
} else {
|
|
25679
|
+
this._getColumnModel(row, column);
|
|
25680
|
+
}
|
|
25681
|
+
var afterEditMethod = editOpts.afterEditMethod;
|
|
25682
|
+
this.$nextTick(function () {
|
|
25683
|
+
_this6.handleFocus(params, evnt);
|
|
25684
|
+
if (afterEditMethod) {
|
|
25685
|
+
afterEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
25686
|
+
$table: _this6,
|
|
25687
|
+
$grid: _this6.$xegrid
|
|
25688
|
+
}));
|
|
25689
|
+
}
|
|
25690
|
+
});
|
|
25691
|
+
}
|
|
25692
|
+
this.emitEvent(type, {
|
|
25693
|
+
row: row,
|
|
25694
|
+
rowIndex: this.getRowIndex(row),
|
|
25695
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
25696
|
+
column: column,
|
|
25697
|
+
columnIndex: this.getColumnIndex(column),
|
|
25698
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
25699
|
+
}, evnt);
|
|
25700
|
+
|
|
25701
|
+
// v4已废弃
|
|
25702
|
+
if (type === 'edit-activated') {
|
|
25703
|
+
this.emitEvent('edit-actived', {
|
|
25704
|
+
row: row,
|
|
25705
|
+
rowIndex: this.getRowIndex(row),
|
|
25706
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
25707
|
+
column: column,
|
|
25708
|
+
columnIndex: this.getColumnIndex(column),
|
|
25709
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
25710
|
+
}, evnt);
|
|
25711
|
+
}
|
|
25712
|
+
} else {
|
|
25713
|
+
var oldColumn = actived.column;
|
|
25647
25714
|
if (mouseConfig) {
|
|
25648
25715
|
this.clearSelected(evnt);
|
|
25649
25716
|
this.clearCellAreas(evnt);
|
|
25650
25717
|
this.clearCopyCellArea(evnt);
|
|
25651
25718
|
}
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
|
|
25719
|
+
if (oldColumn !== column) {
|
|
25720
|
+
var oldModel = oldColumn.model;
|
|
25721
|
+
if (oldModel.update) {
|
|
25722
|
+
utils.setCellValue(row, oldColumn, oldModel.value);
|
|
25723
|
+
}
|
|
25724
|
+
this.clearValidate();
|
|
25655
25725
|
}
|
|
25656
|
-
type = 'edit-activated';
|
|
25657
25726
|
column.renderHeight = cell.offsetHeight;
|
|
25658
25727
|
actived.args = params;
|
|
25659
|
-
actived.row = row;
|
|
25660
25728
|
actived.column = column;
|
|
25661
|
-
|
|
25662
|
-
tableColumn.forEach(function (column) {
|
|
25663
|
-
return _this6._getColumnModel(row, column);
|
|
25664
|
-
});
|
|
25665
|
-
} else {
|
|
25666
|
-
this._getColumnModel(row, column);
|
|
25667
|
-
}
|
|
25668
|
-
var afterEditMethod = editOpts.afterEditMethod;
|
|
25669
|
-
this.$nextTick(function () {
|
|
25729
|
+
setTimeout(function () {
|
|
25670
25730
|
_this6.handleFocus(params, evnt);
|
|
25671
|
-
if (afterEditMethod) {
|
|
25672
|
-
afterEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
25673
|
-
$table: _this6,
|
|
25674
|
-
$grid: _this6.$xegrid
|
|
25675
|
-
}));
|
|
25676
|
-
}
|
|
25677
25731
|
});
|
|
25678
25732
|
}
|
|
25679
|
-
|
|
25680
|
-
|
|
25681
|
-
|
|
25682
|
-
$rowIndex: this.getVMRowIndex(row),
|
|
25683
|
-
column: column,
|
|
25684
|
-
columnIndex: this.getColumnIndex(column),
|
|
25685
|
-
$columnIndex: this.getVMColumnIndex(column)
|
|
25686
|
-
}, evnt);
|
|
25687
|
-
|
|
25688
|
-
// v4已废弃
|
|
25689
|
-
if (type === 'edit-activated') {
|
|
25690
|
-
this.emitEvent('edit-actived', {
|
|
25691
|
-
row: row,
|
|
25692
|
-
rowIndex: this.getRowIndex(row),
|
|
25693
|
-
$rowIndex: this.getVMRowIndex(row),
|
|
25694
|
-
column: column,
|
|
25695
|
-
columnIndex: this.getColumnIndex(column),
|
|
25696
|
-
$columnIndex: this.getVMColumnIndex(column)
|
|
25697
|
-
}, evnt);
|
|
25698
|
-
}
|
|
25699
|
-
} else {
|
|
25700
|
-
var oldColumn = actived.column;
|
|
25701
|
-
if (mouseConfig) {
|
|
25702
|
-
this.clearSelected(evnt);
|
|
25703
|
-
this.clearCellAreas(evnt);
|
|
25704
|
-
this.clearCopyCellArea(evnt);
|
|
25705
|
-
}
|
|
25706
|
-
if (oldColumn !== column) {
|
|
25707
|
-
var oldModel = oldColumn.model;
|
|
25708
|
-
if (oldModel.update) {
|
|
25709
|
-
utils.setCellValue(row, oldColumn, oldModel.value);
|
|
25710
|
-
}
|
|
25711
|
-
this.clearValidate();
|
|
25712
|
-
}
|
|
25713
|
-
column.renderHeight = cell.offsetHeight;
|
|
25714
|
-
actived.args = params;
|
|
25715
|
-
actived.column = column;
|
|
25716
|
-
setTimeout(function () {
|
|
25717
|
-
_this6.handleFocus(params, evnt);
|
|
25718
|
-
});
|
|
25733
|
+
focused.column = null;
|
|
25734
|
+
focused.row = null;
|
|
25735
|
+
this.focus();
|
|
25719
25736
|
}
|
|
25720
|
-
this.focus();
|
|
25721
25737
|
}
|
|
25722
25738
|
return this.$nextTick();
|
|
25723
25739
|
},
|
|
@@ -25795,9 +25811,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25795
25811
|
return this.$nextTick();
|
|
25796
25812
|
},
|
|
25797
25813
|
_getActiveRecord: function _getActiveRecord() {
|
|
25798
|
-
|
|
25799
|
-
// warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord'])
|
|
25800
|
-
// }
|
|
25814
|
+
if (false) {}
|
|
25801
25815
|
// 即将废弃
|
|
25802
25816
|
return this.getEditRecord();
|
|
25803
25817
|
},
|
|
@@ -25814,9 +25828,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25814
25828
|
return null;
|
|
25815
25829
|
},
|
|
25816
25830
|
_isActiveByRow: function _isActiveByRow(row) {
|
|
25817
|
-
|
|
25818
|
-
// warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
25819
|
-
// }
|
|
25831
|
+
if (false) {}
|
|
25820
25832
|
// 即将废弃
|
|
25821
25833
|
return this.isEditByRow(row);
|
|
25822
25834
|
},
|
|
@@ -25873,9 +25885,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25873
25885
|
}
|
|
25874
25886
|
},
|
|
25875
25887
|
_setActiveRow: function _setActiveRow(row) {
|
|
25876
|
-
|
|
25877
|
-
// warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
25878
|
-
// }
|
|
25888
|
+
if (false) {}
|
|
25879
25889
|
// 即将废弃
|
|
25880
25890
|
return this.setEditRow(row);
|
|
25881
25891
|
},
|
|
@@ -25892,9 +25902,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25892
25902
|
return this.setEditCell(row, column);
|
|
25893
25903
|
},
|
|
25894
25904
|
_setActiveCell: function _setActiveCell(row) {
|
|
25895
|
-
|
|
25896
|
-
// warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
25897
|
-
// }
|
|
25905
|
+
if (false) {}
|
|
25898
25906
|
// 即将废弃
|
|
25899
25907
|
return this.setEditCell(row);
|
|
25900
25908
|
},
|