vxe-table 3.8.4 → 3.8.5-beta.1
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 +99 -90
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +3 -3
- package/lib/table/index.min.js +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/index.js +3 -3
- 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.1715055325097.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1714486550546.woff → iconfont.1715055325097.woff} +0 -0
- /package/lib/icon/style/{iconfont.1714486550546.woff2 → iconfont.1715055325097.woff2} +0 -0
- /package/lib/{iconfont.1714486550546.ttf → iconfont.1715055325097.ttf} +0 -0
- /package/lib/{iconfont.1714486550546.woff → iconfont.1715055325097.woff} +0 -0
- /package/lib/{iconfont.1714486550546.woff2 → iconfont.1715055325097.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.1", "] ").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.1",
|
|
13071
13071
|
reg: reg,
|
|
13072
13072
|
use: use,
|
|
13073
13073
|
setup: setup,
|
|
@@ -13091,12 +13091,12 @@ var VXETable = {
|
|
|
13091
13091
|
|
|
13092
13092
|
|
|
13093
13093
|
/* harmony default export */ var v_x_e_table = (VXETable);
|
|
13094
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
|
|
13095
|
+
var es_object_assign = __webpack_require__(9085);
|
|
13094
13096
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
|
|
13095
13097
|
var es_array_iterator = __webpack_require__(3792);
|
|
13096
13098
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.js
|
|
13097
13099
|
var es_map = __webpack_require__(6033);
|
|
13098
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
|
|
13099
|
-
var es_object_assign = __webpack_require__(9085);
|
|
13100
13100
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fixed.js
|
|
13101
13101
|
var es_string_fixed = __webpack_require__(4298);
|
|
13102
13102
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
|
|
@@ -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);
|
|
@@ -24083,15 +24093,16 @@ function handleUupdateResize(_vm) {
|
|
|
24083
24093
|
|
|
24084
24094
|
|
|
24085
24095
|
|
|
24096
|
+
|
|
24086
24097
|
var VxeTable = Object.assign(table, {
|
|
24087
24098
|
install: function install(Vue) {
|
|
24088
24099
|
if (typeof window !== 'undefined' && window.VXETableMixin) {
|
|
24089
24100
|
table.mixins.push(window.VXETableMixin);
|
|
24090
24101
|
delete window.VXETableMixin;
|
|
24091
24102
|
}
|
|
24092
|
-
if (typeof window !== 'undefined' && window.
|
|
24093
|
-
window.
|
|
24094
|
-
delete window.
|
|
24103
|
+
if (typeof window !== 'undefined' && window.VxeTableExtendCellArea && window.VxeTableExtendCellArea.init) {
|
|
24104
|
+
window.VxeTableExtendCellArea.init(v_x_e_table);
|
|
24105
|
+
delete window.VxeTableExtendCellArea;
|
|
24095
24106
|
} else if (typeof window !== 'undefined' && window.VXETablePro && window.VXETablePro.init) {
|
|
24096
24107
|
window.VXETablePro.init(v_x_e_table);
|
|
24097
24108
|
delete window.VXETablePro;
|
|
@@ -25630,94 +25641,100 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25630
25641
|
editConfig = this.editConfig,
|
|
25631
25642
|
mouseConfig = this.mouseConfig;
|
|
25632
25643
|
var mode = editOpts.mode;
|
|
25633
|
-
var actived = editStore.actived
|
|
25644
|
+
var actived = editStore.actived,
|
|
25645
|
+
focused = editStore.focused;
|
|
25634
25646
|
var row = params.row,
|
|
25635
25647
|
column = params.column;
|
|
25636
25648
|
var editRender = column.editRender;
|
|
25637
25649
|
var cell = params.cell = params.cell || this.getCell(row, column);
|
|
25638
25650
|
var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
25639
|
-
if (isEnableConf(editConfig) && isEnableConf(editRender)
|
|
25640
|
-
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
|
|
25644
|
-
|
|
25645
|
-
|
|
25646
|
-
|
|
25651
|
+
if (cell && isEnableConf(editConfig) && isEnableConf(editRender)) {
|
|
25652
|
+
// 激活编辑
|
|
25653
|
+
if (!this.hasPendingByRow(row)) {
|
|
25654
|
+
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
25655
|
+
// 判断是否禁用编辑
|
|
25656
|
+
var type = 'edit-disabled';
|
|
25657
|
+
if (!beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
25658
|
+
$table: this,
|
|
25659
|
+
$grid: this.$xegrid
|
|
25660
|
+
}))) {
|
|
25661
|
+
if (mouseConfig) {
|
|
25662
|
+
this.clearSelected(evnt);
|
|
25663
|
+
this.clearCellAreas(evnt);
|
|
25664
|
+
this.clearCopyCellArea(evnt);
|
|
25665
|
+
}
|
|
25666
|
+
this.closeTooltip();
|
|
25667
|
+
if (actived.column) {
|
|
25668
|
+
this.clearEdit(evnt);
|
|
25669
|
+
}
|
|
25670
|
+
type = 'edit-activated';
|
|
25671
|
+
column.renderHeight = cell.offsetHeight;
|
|
25672
|
+
actived.args = params;
|
|
25673
|
+
actived.row = row;
|
|
25674
|
+
actived.column = column;
|
|
25675
|
+
if (mode === 'row') {
|
|
25676
|
+
tableColumn.forEach(function (column) {
|
|
25677
|
+
return _this6._getColumnModel(row, column);
|
|
25678
|
+
});
|
|
25679
|
+
} else {
|
|
25680
|
+
this._getColumnModel(row, column);
|
|
25681
|
+
}
|
|
25682
|
+
var afterEditMethod = editOpts.afterEditMethod;
|
|
25683
|
+
this.$nextTick(function () {
|
|
25684
|
+
_this6.handleFocus(params, evnt);
|
|
25685
|
+
if (afterEditMethod) {
|
|
25686
|
+
afterEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
25687
|
+
$table: _this6,
|
|
25688
|
+
$grid: _this6.$xegrid
|
|
25689
|
+
}));
|
|
25690
|
+
}
|
|
25691
|
+
});
|
|
25692
|
+
}
|
|
25693
|
+
this.emitEvent(type, {
|
|
25694
|
+
row: row,
|
|
25695
|
+
rowIndex: this.getRowIndex(row),
|
|
25696
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
25697
|
+
column: column,
|
|
25698
|
+
columnIndex: this.getColumnIndex(column),
|
|
25699
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
25700
|
+
}, evnt);
|
|
25701
|
+
|
|
25702
|
+
// v4已废弃
|
|
25703
|
+
if (type === 'edit-activated') {
|
|
25704
|
+
this.emitEvent('edit-actived', {
|
|
25705
|
+
row: row,
|
|
25706
|
+
rowIndex: this.getRowIndex(row),
|
|
25707
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
25708
|
+
column: column,
|
|
25709
|
+
columnIndex: this.getColumnIndex(column),
|
|
25710
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
25711
|
+
}, evnt);
|
|
25712
|
+
}
|
|
25713
|
+
} else {
|
|
25714
|
+
var oldColumn = actived.column;
|
|
25647
25715
|
if (mouseConfig) {
|
|
25648
25716
|
this.clearSelected(evnt);
|
|
25649
25717
|
this.clearCellAreas(evnt);
|
|
25650
25718
|
this.clearCopyCellArea(evnt);
|
|
25651
25719
|
}
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
|
|
25720
|
+
if (oldColumn !== column) {
|
|
25721
|
+
var oldModel = oldColumn.model;
|
|
25722
|
+
if (oldModel.update) {
|
|
25723
|
+
utils.setCellValue(row, oldColumn, oldModel.value);
|
|
25724
|
+
}
|
|
25725
|
+
this.clearValidate();
|
|
25655
25726
|
}
|
|
25656
|
-
type = 'edit-activated';
|
|
25657
25727
|
column.renderHeight = cell.offsetHeight;
|
|
25658
25728
|
actived.args = params;
|
|
25659
|
-
actived.row = row;
|
|
25660
25729
|
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 () {
|
|
25730
|
+
setTimeout(function () {
|
|
25670
25731
|
_this6.handleFocus(params, evnt);
|
|
25671
|
-
if (afterEditMethod) {
|
|
25672
|
-
afterEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
25673
|
-
$table: _this6,
|
|
25674
|
-
$grid: _this6.$xegrid
|
|
25675
|
-
}));
|
|
25676
|
-
}
|
|
25677
25732
|
});
|
|
25678
25733
|
}
|
|
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
|
-
});
|
|
25734
|
+
focused.column = null;
|
|
25735
|
+
focused.row = null;
|
|
25736
|
+
this.focus();
|
|
25719
25737
|
}
|
|
25720
|
-
this.focus();
|
|
25721
25738
|
}
|
|
25722
25739
|
return this.$nextTick();
|
|
25723
25740
|
},
|
|
@@ -25795,9 +25812,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25795
25812
|
return this.$nextTick();
|
|
25796
25813
|
},
|
|
25797
25814
|
_getActiveRecord: function _getActiveRecord() {
|
|
25798
|
-
|
|
25799
|
-
// warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord'])
|
|
25800
|
-
// }
|
|
25815
|
+
if (false) {}
|
|
25801
25816
|
// 即将废弃
|
|
25802
25817
|
return this.getEditRecord();
|
|
25803
25818
|
},
|
|
@@ -25814,9 +25829,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25814
25829
|
return null;
|
|
25815
25830
|
},
|
|
25816
25831
|
_isActiveByRow: function _isActiveByRow(row) {
|
|
25817
|
-
|
|
25818
|
-
// warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
25819
|
-
// }
|
|
25832
|
+
if (false) {}
|
|
25820
25833
|
// 即将废弃
|
|
25821
25834
|
return this.isEditByRow(row);
|
|
25822
25835
|
},
|
|
@@ -25873,9 +25886,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25873
25886
|
}
|
|
25874
25887
|
},
|
|
25875
25888
|
_setActiveRow: function _setActiveRow(row) {
|
|
25876
|
-
|
|
25877
|
-
// warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
25878
|
-
// }
|
|
25889
|
+
if (false) {}
|
|
25879
25890
|
// 即将废弃
|
|
25880
25891
|
return this.setEditRow(row);
|
|
25881
25892
|
},
|
|
@@ -25892,9 +25903,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
25892
25903
|
return this.setEditCell(row, column);
|
|
25893
25904
|
},
|
|
25894
25905
|
_setActiveCell: function _setActiveCell(row) {
|
|
25895
|
-
|
|
25896
|
-
// warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
25897
|
-
// }
|
|
25906
|
+
if (false) {}
|
|
25898
25907
|
// 即将废弃
|
|
25899
25908
|
return this.setEditCell(row);
|
|
25900
25909
|
},
|