vxe-table 3.4.12-beta.1 → 3.4.14-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.
Files changed (56) hide show
  1. package/README.en.md +3 -1
  2. package/README.md +5 -3
  3. package/README.zh-TW.md +5 -3
  4. package/lib/edit/src/mixin.js +39 -13
  5. package/lib/edit/src/mixin.min.js +1 -1
  6. package/lib/export/src/mixin.js +15 -10
  7. package/lib/export/src/mixin.min.js +1 -1
  8. package/lib/footer/src/footer.js +11 -0
  9. package/lib/footer/src/footer.min.js +1 -1
  10. package/lib/form/src/form.js +6 -1
  11. package/lib/form/src/form.min.js +1 -1
  12. package/lib/grid/src/grid.js +5 -2
  13. package/lib/grid/src/grid.min.js +1 -1
  14. package/lib/header/src/header.js +12 -0
  15. package/lib/header/src/header.min.js +1 -1
  16. package/lib/index.css +1 -1
  17. package/lib/index.umd.js +208 -77
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/input/src/input.js +58 -37
  20. package/lib/input/src/input.min.js +1 -1
  21. package/lib/modal/src/modal.js +1 -1
  22. package/lib/modal/src/modal.min.js +1 -1
  23. package/lib/pulldown/src/pulldown.js +13 -0
  24. package/lib/pulldown/src/pulldown.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/table/src/body.js +24 -5
  28. package/lib/table/src/body.min.js +1 -1
  29. package/lib/table/src/methods.js +25 -10
  30. package/lib/table/src/methods.min.js +1 -1
  31. package/lib/tools/src/utils.js +1 -0
  32. package/lib/tools/src/utils.min.js +1 -1
  33. package/lib/validator/src/mixin.js +2 -0
  34. package/lib/validator/src/mixin.min.js +1 -1
  35. package/package.json +4 -4
  36. package/packages/edit/src/mixin.js +20 -11
  37. package/packages/export/src/mixin.js +16 -9
  38. package/packages/footer/src/footer.js +10 -0
  39. package/packages/form/src/form.js +6 -4
  40. package/packages/grid/src/grid.js +3 -2
  41. package/packages/header/src/header.js +11 -0
  42. package/packages/input/src/input.js +42 -32
  43. package/packages/modal/src/modal.js +1 -1
  44. package/packages/pulldown/src/pulldown.js +12 -0
  45. package/packages/table/src/body.js +41 -7
  46. package/packages/table/src/methods.js +11 -10
  47. package/packages/tools/src/utils.js +1 -0
  48. package/packages/validator/src/mixin.js +11 -1
  49. package/styles/button.scss +4 -4
  50. package/styles/modal.scss +14 -13
  51. package/styles/table.scss +4 -4
  52. package/styles/variable.scss +8 -0
  53. package/types/all.d.ts +1 -0
  54. package/types/column.d.ts +7 -1
  55. package/types/form.d.ts +2 -1
  56. package/types/table.d.ts +6 -2
package/lib/index.umd.js CHANGED
@@ -8931,6 +8931,7 @@ var utils_ColumnInfo = /*#__PURE__*/function () {
8931
8931
  // 基本属性
8932
8932
  type: _vm.type,
8933
8933
  property: _vm.field,
8934
+ field: _vm.field,
8934
8935
  title: _vm.title,
8935
8936
  width: _vm.width,
8936
8937
  minWidth: _vm.minWidth,
@@ -9801,14 +9802,14 @@ function getChangeEvent(renderOpts) {
9801
9802
  return 'change';
9802
9803
  }
9803
9804
 
9804
- function parseDate(value, props) {
9805
+ function renderer_parseDate(value, props) {
9805
9806
  return value && props.valueFormat ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(value, props.valueFormat) : value;
9806
9807
  }
9807
9808
 
9808
9809
  function getFormatDate(value, props, defaultFormat) {
9809
9810
  var _props$dateConfig = props.dateConfig,
9810
9811
  dateConfig = _props$dateConfig === void 0 ? {} : _props$dateConfig;
9811
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
9812
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(renderer_parseDate(value, props), dateConfig.labelFormat || defaultFormat);
9812
9813
  }
9813
9814
 
9814
9815
  function getLabelFormatDate(value, props) {
@@ -11496,6 +11497,19 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11496
11497
  this.$el._onscroll = null;
11497
11498
  this.$el.onscroll = null;
11498
11499
  },
11500
+ destroyed: function destroyed() {
11501
+ var $xetable = this.$parent,
11502
+ fixedType = this.fixedType;
11503
+ var elemStore = $xetable.elemStore;
11504
+ var prefix = "".concat(fixedType || 'main', "-body-");
11505
+ elemStore["".concat(prefix, "wrapper")] = null;
11506
+ elemStore["".concat(prefix, "table")] = null;
11507
+ elemStore["".concat(prefix, "colgroup")] = null;
11508
+ elemStore["".concat(prefix, "list")] = null;
11509
+ elemStore["".concat(prefix, "xSpace")] = null;
11510
+ elemStore["".concat(prefix, "ySpace")] = null;
11511
+ elemStore["".concat(prefix, "emptyBlock")] = null;
11512
+ },
11499
11513
  render: function render(h) {
11500
11514
  var _e = this._e,
11501
11515
  $xetable = this.$parent,
@@ -11662,8 +11676,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11662
11676
  var rightElem = rightBody ? rightBody.$el : null;
11663
11677
  var bodyYElem = elemStore['main-body-ySpace'];
11664
11678
  var bodyXElem = elemStore['main-body-xSpace'];
11665
- var bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0;
11666
- var bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0;
11679
+ var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
11680
+ var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
11667
11681
  var scrollTop = scrollBodyElem.scrollTop;
11668
11682
  var scrollLeft = bodyElem.scrollLeft;
11669
11683
  var isRollX = scrollLeft !== lastScrollLeft;
@@ -11719,6 +11733,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11719
11733
  fixed: fixedType,
11720
11734
  scrollTop: scrollTop,
11721
11735
  scrollLeft: scrollLeft,
11736
+ scrollHeight: bodyElem.scrollHeight,
11737
+ scrollWidth: bodyElem.scrollWidth,
11722
11738
  bodyHeight: bodyHeight,
11723
11739
  bodyWidth: bodyWidth,
11724
11740
  isX: isRollX,
@@ -11730,7 +11746,9 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11730
11746
 
11731
11747
  var $xetable = this.$parent;
11732
11748
  var $refs = $xetable.$refs,
11733
- elemStore = $xetable.elemStore;
11749
+ elemStore = $xetable.elemStore,
11750
+ scrollYLoad = $xetable.scrollYLoad,
11751
+ scrollXLoad = $xetable.scrollXLoad;
11734
11752
  var tableBody = $refs.tableBody,
11735
11753
  leftBody = $refs.leftBody,
11736
11754
  rightBody = $refs.rightBody;
@@ -11740,8 +11758,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11740
11758
  var remainSize = this.isPrevWheelTop === isTopWheel ? Math.max(0, this.wheelYSize - this.wheelYTotal) : 0;
11741
11759
  var bodyYElem = elemStore['main-body-ySpace'];
11742
11760
  var bodyXElem = elemStore['main-body-xSpace'];
11743
- var bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0;
11744
- var bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0;
11761
+ var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
11762
+ var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
11745
11763
  this.isPrevWheelTop = isTopWheel;
11746
11764
  this.wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
11747
11765
  this.wheelYInterval = 0;
@@ -11787,6 +11805,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11787
11805
  fixed: fixedType,
11788
11806
  scrollTop: bodyElem.scrollTop,
11789
11807
  scrollLeft: bodyElem.scrollLeft,
11808
+ scrollHeight: bodyElem.scrollHeight,
11809
+ scrollWidth: bodyElem.scrollWidth,
11790
11810
  bodyHeight: bodyHeight,
11791
11811
  bodyWidth: bodyWidth,
11792
11812
  isX: isRollX,
@@ -14227,16 +14247,23 @@ var Methods = {
14227
14247
  afterFullData = this.afterFullData,
14228
14248
  treeConfig = this.treeConfig,
14229
14249
  treeOpts = this.treeOpts,
14230
- checkboxOpts = this.checkboxOpts;
14250
+ checkboxOpts = this.checkboxOpts,
14251
+ tableFullTreeData = this.tableFullTreeData,
14252
+ afterTreeFullData = this.afterTreeFullData;
14253
+ var transform = treeOpts.transform,
14254
+ children = treeOpts.children,
14255
+ mapChildren = treeOpts.mapChildren;
14231
14256
  var property = checkboxOpts.checkField;
14232
- var currTableData = isFull ? tableFullData : afterFullData;
14257
+ var currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
14233
14258
  var rowList = [];
14234
14259
 
14235
14260
  if (property) {
14236
14261
  if (treeConfig) {
14237
14262
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.filterTree(currTableData, function (row) {
14238
14263
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, property);
14239
- }, treeOpts);
14264
+ }, {
14265
+ children: transform ? mapChildren : children
14266
+ });
14240
14267
  } else {
14241
14268
  rowList = currTableData.filter(function (row) {
14242
14269
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, property);
@@ -14248,7 +14275,9 @@ var Methods = {
14248
14275
  if (treeConfig) {
14249
14276
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.filterTree(currTableData, function (row) {
14250
14277
  return selection.indexOf(row) > -1;
14251
- }, treeOpts);
14278
+ }, {
14279
+ children: transform ? mapChildren : children
14280
+ });
14252
14281
  } else {
14253
14282
  rowList = currTableData.filter(function (row) {
14254
14283
  return selection.indexOf(row) > -1;
@@ -14314,7 +14343,8 @@ var Methods = {
14314
14343
  var filterColumns = [];
14315
14344
  var orderColumns = [];
14316
14345
  tableFullColumn.forEach(function (column) {
14317
- var sortable = column.sortable,
14346
+ var property = column.property,
14347
+ sortable = column.sortable,
14318
14348
  order = column.order,
14319
14349
  filters = column.filters;
14320
14350
 
@@ -14340,7 +14370,8 @@ var Methods = {
14340
14370
  if (!allRemoteSort && sortable && order) {
14341
14371
  orderColumns.push({
14342
14372
  column: column,
14343
- property: column.property,
14373
+ field: column.property,
14374
+ property: property,
14344
14375
  order: order
14345
14376
  });
14346
14377
  }
@@ -16056,7 +16087,9 @@ var Methods = {
16056
16087
  // 如果是按下非功能键之外允许直接编辑
16057
16088
 
16058
16089
  if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
16059
- if (!editOpts.activeMethod || editOpts.activeMethod(selected.args)) {
16090
+ if (!editOpts.activeMethod || editOpts.activeMethod(_objectSpread2(_objectSpread2({}, selected.args), {}, {
16091
+ $table: _this26
16092
+ }))) {
16060
16093
  if (editMethod) {
16061
16094
  editMethod({
16062
16095
  row: selected.row,
@@ -17657,12 +17690,14 @@ var Methods = {
17657
17690
  getSortColumns: function getSortColumns() {
17658
17691
  var sortList = [];
17659
17692
  this.tableFullColumn.forEach(function (column) {
17660
- var order = column.order;
17693
+ var property = column.property,
17694
+ order = column.order;
17661
17695
 
17662
17696
  if ((column.sortable || column.remoteSort) && order) {
17663
17697
  sortList.push({
17664
17698
  column: column,
17665
- property: column.property,
17699
+ field: column.property,
17700
+ property: property,
17666
17701
  order: order
17667
17702
  });
17668
17703
  }
@@ -19080,7 +19115,7 @@ var Methods = {
19080
19115
  }
19081
19116
  }; // Module methods
19082
19117
 
19083
- var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
19118
+ var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
19084
19119
  funcs.forEach(function (name) {
19085
19120
  Methods[name] = function () {
19086
19121
  if (false) {}
@@ -21460,6 +21495,7 @@ var Menu = {
21460
21495
 
21461
21496
 
21462
21497
 
21498
+
21463
21499
  var mixin_getRowid = UtilTools.getRowid;
21464
21500
 
21465
21501
  function insertTreeRow(_vm, newRecords, isAppend) {
@@ -21468,22 +21504,28 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21468
21504
  fullDataRowIdData = _vm.fullDataRowIdData,
21469
21505
  fullAllDataRowIdData = _vm.fullAllDataRowIdData,
21470
21506
  treeOpts = _vm.treeOpts;
21507
+ var rowField = treeOpts.rowField,
21508
+ parentField = treeOpts.parentField,
21509
+ children = treeOpts.children,
21510
+ mapChildren = treeOpts.mapChildren;
21471
21511
  var funcName = isAppend ? 'push' : 'unshift';
21472
21512
  newRecords.forEach(function (item) {
21473
- var parentRowId = item[treeOpts.parentField];
21513
+ var parentRowId = item[parentField];
21474
21514
  var rowid = mixin_getRowid(_vm, item);
21475
21515
  var matchObj = parentRowId ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
21476
- return parentRowId === item[treeOpts.rowField];
21477
- }, treeOpts) : null;
21516
+ return parentRowId === item[rowField];
21517
+ }, {
21518
+ children: mapChildren
21519
+ }) : null;
21478
21520
 
21479
21521
  if (matchObj) {
21480
21522
  var parentRow = matchObj.item;
21481
21523
  var parentRest = fullAllDataRowIdData[mixin_getRowid(_vm, parentRow)];
21482
21524
  var parentLevel = parentRest ? parentRest.level : 0;
21483
- var parentChilds = parentRow[treeOpts.children];
21525
+ var parentChilds = parentRow[children];
21484
21526
 
21485
21527
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(parentChilds)) {
21486
- parentChilds = parentRow[treeOpts.children] = [];
21528
+ parentChilds = parentRow[children] = [];
21487
21529
  }
21488
21530
 
21489
21531
  parentChilds[funcName](item);
@@ -21554,7 +21596,9 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21554
21596
  fullDataRowIdData = this.fullDataRowIdData,
21555
21597
  fullAllDataRowIdData = this.fullAllDataRowIdData,
21556
21598
  treeOpts = this.treeOpts;
21557
- var transform = treeOpts.transform;
21599
+ var transform = treeOpts.transform,
21600
+ rowField = treeOpts.rowField,
21601
+ mapChildren = treeOpts.mapChildren;
21558
21602
 
21559
21603
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(records)) {
21560
21604
  records = [records];
@@ -21602,8 +21646,10 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21602
21646
  // 如果为虚拟树
21603
21647
  if (treeConfig && transform) {
21604
21648
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
21605
- return row[treeOpts.rowField] === item[treeOpts.rowField];
21606
- }, treeOpts);
21649
+ return row[rowField] === item[rowField];
21650
+ }, {
21651
+ children: mapChildren
21652
+ });
21607
21653
 
21608
21654
  if (matchObj) {
21609
21655
  var parentRow = matchObj.parent;
@@ -21616,7 +21662,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21616
21662
  if (false) {}
21617
21663
 
21618
21664
  if (parentRow) {
21619
- item[treeOpts.parentField] = parentRow[treeOpts.rowField];
21665
+ item[treeOpts.parentField] = parentRow[rowField];
21620
21666
  }
21621
21667
 
21622
21668
  parentChilds.splice(matchObj.index + i, 0, item);
@@ -21644,7 +21690,15 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21644
21690
  throw new Error(UtilTools.getLog('vxe.error.noTree', ['insert']));
21645
21691
  }
21646
21692
 
21647
- var afIndex = afterFullData.indexOf(row);
21693
+ var afIndex = -1; // 如果是可视索引
21694
+
21695
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(row)) {
21696
+ if (row < afterFullData.length) {
21697
+ afIndex = row;
21698
+ }
21699
+ } else {
21700
+ afIndex = afterFullData.indexOf(row);
21701
+ }
21648
21702
 
21649
21703
  if (afIndex === -1) {
21650
21704
  throw new Error(UtilTools.error('vxe.error.unableInsert'));
@@ -21995,7 +22049,9 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21995
22049
  // 判断是否禁用编辑
21996
22050
  var type = 'edit-disabled';
21997
22051
 
21998
- if (!activeMethod || activeMethod(params)) {
22052
+ if (!activeMethod || activeMethod(_objectSpread2(_objectSpread2({}, params), {}, {
22053
+ $table: this
22054
+ }))) {
21999
22055
  if (mouseConfig) {
22000
22056
  this.clearSelected(evnt);
22001
22057
  this.clearCellAreas(evnt);
@@ -23178,7 +23234,7 @@ var msgQueue = [];
23178
23234
 
23179
23235
  return this.$nextTick().then(function () {
23180
23236
  if (!_this7.zoomLocat) {
23181
- var marginSize = _this7.marginSize;
23237
+ var marginSize = Math.max(0, _this7.marginSize);
23182
23238
 
23183
23239
  var modalBoxElem = _this7.getBox();
23184
23240
 
@@ -24519,18 +24575,11 @@ function renderExtraSuffixIcon(h, _vm) {
24519
24575
  dateValue: function dateValue() {
24520
24576
  var value = this.value,
24521
24577
  isDatePickerType = this.isDatePickerType,
24522
- type = this.type,
24523
24578
  dateValueFormat = this.dateValueFormat;
24524
24579
  var val = null;
24525
24580
 
24526
24581
  if (value && isDatePickerType) {
24527
- var date;
24528
-
24529
- if (type === 'time') {
24530
- date = toStringTimeDate(value);
24531
- } else {
24532
- date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(value, dateValueFormat);
24533
- }
24582
+ var date = this.parseDate(value, dateValueFormat);
24534
24583
 
24535
24584
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(date)) {
24536
24585
  val = date;
@@ -24589,13 +24638,16 @@ function renderExtraSuffixIcon(h, _vm) {
24589
24638
 
24590
24639
  return '';
24591
24640
  },
24641
+ firstDayOfWeek: function firstDayOfWeek() {
24642
+ var startDay = this.startDay,
24643
+ startWeek = this.startWeek;
24644
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(startDay) ? startDay : startWeek);
24645
+ },
24592
24646
  weekDatas: function weekDatas() {
24593
24647
  var weeks = [];
24594
24648
 
24595
24649
  if (this.isDatePickerType) {
24596
- var startDay = this.startDay,
24597
- startWeek = this.startWeek;
24598
- var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(startDay) ? startDay : startWeek);
24650
+ var sWeek = this.firstDayOfWeek;
24599
24651
  weeks.push(sWeek);
24600
24652
 
24601
24653
  for (var index = 0; index < 6; index++) {
@@ -24761,7 +24813,9 @@ function renderExtraSuffixIcon(h, _vm) {
24761
24813
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.chunk(this.dayList, 7);
24762
24814
  },
24763
24815
  weekDates: function weekDates() {
24764
- return this.dayDatas.map(function (list) {
24816
+ var dayDatas = this.dayDatas,
24817
+ firstDayOfWeek = this.firstDayOfWeek;
24818
+ return dayDatas.map(function (list) {
24765
24819
  var firstItem = list[0];
24766
24820
  var item = {
24767
24821
  date: firstItem.date,
@@ -24770,7 +24824,7 @@ function renderExtraSuffixIcon(h, _vm) {
24770
24824
  isCurrent: false,
24771
24825
  isNow: false,
24772
24826
  isNext: false,
24773
- label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getYearWeek(firstItem.date)
24827
+ label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getYearWeek(firstItem.date, firstDayOfWeek)
24774
24828
  };
24775
24829
  return [item].concat(list);
24776
24830
  });
@@ -25160,6 +25214,15 @@ function renderExtraSuffixIcon(h, _vm) {
25160
25214
  $event: evnt
25161
25215
  });
25162
25216
  },
25217
+ parseDate: function parseDate(value, format) {
25218
+ var type = this.type;
25219
+
25220
+ if (type === 'time') {
25221
+ return toStringTimeDate(value);
25222
+ }
25223
+
25224
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(value, format);
25225
+ },
25163
25226
 
25164
25227
  /**
25165
25228
  * 检查初始值
@@ -25204,7 +25267,8 @@ function renderExtraSuffixIcon(h, _vm) {
25204
25267
  datetimePanelValue = this.datetimePanelValue,
25205
25268
  dateLabelFormat = this.dateLabelFormat,
25206
25269
  min = this.min,
25207
- max = this.max;
25270
+ max = this.max,
25271
+ firstDayOfWeek = this.firstDayOfWeek;
25208
25272
 
25209
25273
  if (!inpReadonly) {
25210
25274
  if (isNumType) {
@@ -25233,13 +25297,7 @@ function renderExtraSuffixIcon(h, _vm) {
25233
25297
  if (inputValue) {
25234
25298
  if (type === 'week' || type === 'quarter') {// 周和季度选择器不支持解析,无需处理
25235
25299
  } else {
25236
- var inpDateVal;
25237
-
25238
- if (type === 'time') {
25239
- inpDateVal = toStringTimeDate(inputValue);
25240
- } else {
25241
- inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(inputValue, dateLabelFormat);
25242
- }
25300
+ var inpDateVal = this.parseDate(inputValue, dateLabelFormat);
25243
25301
 
25244
25302
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(inpDateVal)) {
25245
25303
  if (type === 'time') {
@@ -25266,7 +25324,9 @@ function renderExtraSuffixIcon(h, _vm) {
25266
25324
  isChange = true;
25267
25325
  }
25268
25326
 
25269
- this.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(inpDateVal, dateLabelFormat);
25327
+ this.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(inpDateVal, dateLabelFormat, {
25328
+ firstDay: firstDayOfWeek
25329
+ });
25270
25330
 
25271
25331
  if (isChange) {
25272
25332
  this.dateChange(inpDateVal);
@@ -25659,20 +25719,35 @@ function renderExtraSuffixIcon(h, _vm) {
25659
25719
  dateParseValue: function dateParseValue(date) {
25660
25720
  var type = this.type,
25661
25721
  dateLabelFormat = this.dateLabelFormat,
25662
- valueFormat = this.valueFormat;
25722
+ valueFormat = this.valueFormat,
25723
+ firstDayOfWeek = this.firstDayOfWeek;
25663
25724
  var dValue = null;
25664
25725
  var dLabel = '';
25665
25726
 
25666
25727
  if (date) {
25667
- if (type === 'time') {
25668
- dValue = toStringTimeDate(date);
25669
- } else {
25670
- dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(date, valueFormat);
25671
- }
25728
+ dValue = this.parseDate(date, valueFormat);
25672
25729
  }
25673
25730
 
25674
25731
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(dValue)) {
25675
- dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(dValue, dateLabelFormat);
25732
+ dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(dValue, dateLabelFormat, {
25733
+ firstDay: firstDayOfWeek
25734
+ }); // 由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年
25735
+
25736
+ if (dateLabelFormat && type === 'week') {
25737
+ var firstWeekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(dValue, 0, firstDayOfWeek, firstDayOfWeek);
25738
+
25739
+ if (firstWeekDate.getFullYear() < dValue.getFullYear()) {
25740
+ var yyIndex = dateLabelFormat.indexOf('yyyy');
25741
+
25742
+ if (yyIndex > -1) {
25743
+ var yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
25744
+
25745
+ if (yyNum && !isNaN(yyNum)) {
25746
+ dLabel = dLabel.replace("".concat(yyNum), "".concat(yyNum - 1));
25747
+ }
25748
+ }
25749
+ }
25750
+ }
25676
25751
  } else {
25677
25752
  dValue = null;
25678
25753
  }
@@ -25683,7 +25758,8 @@ function renderExtraSuffixIcon(h, _vm) {
25683
25758
  dateOffsetEvent: function dateOffsetEvent(evnt) {
25684
25759
  var isActivated = this.isActivated,
25685
25760
  datePanelValue = this.datePanelValue,
25686
- datePanelType = this.datePanelType;
25761
+ datePanelType = this.datePanelType,
25762
+ firstDayOfWeek = this.firstDayOfWeek;
25687
25763
 
25688
25764
  if (isActivated) {
25689
25765
  evnt.preventDefault();
@@ -25741,11 +25817,11 @@ function renderExtraSuffixIcon(h, _vm) {
25741
25817
  if (isLeftArrow) {
25742
25818
  offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(offsetDay, -1);
25743
25819
  } else if (isUpArrow) {
25744
- offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, -1);
25820
+ offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, -1, firstDayOfWeek);
25745
25821
  } else if (isRightArrow) {
25746
25822
  offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(offsetDay, 1);
25747
25823
  } else if (isDwArrow) {
25748
- offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, 1);
25824
+ offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, 1, firstDayOfWeek);
25749
25825
  }
25750
25826
 
25751
25827
  this.dateMoveDay(offsetDay);
@@ -25769,18 +25845,21 @@ function renderExtraSuffixIcon(h, _vm) {
25769
25845
  dateChange: function dateChange(date) {
25770
25846
  var value = this.value,
25771
25847
  datetimePanelValue = this.datetimePanelValue,
25772
- dateValueFormat = this.dateValueFormat;
25848
+ dateValueFormat = this.dateValueFormat,
25849
+ firstDayOfWeek = this.firstDayOfWeek;
25773
25850
 
25774
25851
  if (this.type === 'week') {
25775
25852
  var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(this.selectDay);
25776
- date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek);
25853
+ date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
25777
25854
  } else if (this.hasTime) {
25778
25855
  date.setHours(datetimePanelValue.getHours());
25779
25856
  date.setMinutes(datetimePanelValue.getMinutes());
25780
25857
  date.setSeconds(datetimePanelValue.getSeconds());
25781
25858
  }
25782
25859
 
25783
- var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat);
25860
+ var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat, {
25861
+ firstDay: firstDayOfWeek
25862
+ });
25784
25863
  this.dateCheckMonth(date);
25785
25864
 
25786
25865
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(value, inpVal)) {
@@ -27991,6 +28070,7 @@ var es_string_repeat = __webpack_require__("38cf");
27991
28070
 
27992
28071
 
27993
28072
 
28073
+
27994
28074
 
27995
28075
 
27996
28076
  var mixin_formatText = UtilTools.formatText; // 默认导出或打印的 HTML 样式
@@ -28026,16 +28106,18 @@ function hasTreeChildren($xetable, row) {
28026
28106
  return row[treeOpts.children] && row[treeOpts.children].length > 0;
28027
28107
  }
28028
28108
 
28029
- function getSeq($xetable, row, rowIndex, column, columnIndex) {
28109
+ function getSeq($xetable, row, $rowIndex, column, $columnIndex) {
28030
28110
  var seqOpts = $xetable.seqOpts;
28031
28111
  var seqMethod = seqOpts.seqMethod || column.seqMethod;
28032
28112
 
28033
28113
  if (seqMethod) {
28034
28114
  return seqMethod({
28035
28115
  row: row,
28036
- rowIndex: rowIndex,
28116
+ rowIndex: $xetable.getRowIndex(row),
28117
+ $rowIndex: $rowIndex,
28037
28118
  column: column,
28038
- columnIndex: columnIndex
28119
+ columnIndex: $xetable.getColumnIndex(column),
28120
+ $columnIndex: $columnIndex
28039
28121
  });
28040
28122
  }
28041
28123
 
@@ -28063,7 +28145,8 @@ function toBooleanValue(cellValue) {
28063
28145
  }
28064
28146
 
28065
28147
  function getLabelData($xetable, opts, columns, datas) {
28066
- var isAllExpand = opts.isAllExpand;
28148
+ var isAllExpand = opts.isAllExpand,
28149
+ mode = opts.mode;
28067
28150
  var treeConfig = $xetable.treeConfig,
28068
28151
  treeOpts = $xetable.treeOpts,
28069
28152
  radioOpts = $xetable.radioOpts,
@@ -28077,7 +28160,7 @@ function getLabelData($xetable, opts, columns, datas) {
28077
28160
  // 如果是树表格只允许导出数据源
28078
28161
  var rest = [];
28079
28162
  var expandMaps = new Map();
28080
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(datas, function (item, rowIndex, items, path, parent, nodes) {
28163
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(datas, function (item, $rowIndex, items, path, parent, nodes) {
28081
28164
  var row = item._row || item;
28082
28165
  var parentRow = parent && parent._row ? parent._row : parent;
28083
28166
 
@@ -28089,7 +28172,7 @@ function getLabelData($xetable, opts, columns, datas) {
28089
28172
  _hasChild: hasRowChild,
28090
28173
  _expand: hasRowChild && $xetable.isTreeExpandByRow(row)
28091
28174
  };
28092
- columns.forEach(function (column, columnIndex) {
28175
+ columns.forEach(function (column, $columnIndex) {
28093
28176
  var cellValue = '';
28094
28177
  var renderOpts = column.editRender || column.cellRender;
28095
28178
  var exportLabelMethod = column.exportMethod;
@@ -28112,7 +28195,9 @@ function getLabelData($xetable, opts, columns, datas) {
28112
28195
  } else {
28113
28196
  switch (column.type) {
28114
28197
  case 'seq':
28115
- cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
28198
+ cellValue = mode === 'all' ? path.map(function (num, i) {
28199
+ return i % 2 === 0 ? Number(num) + 1 : '.';
28200
+ }).join('') : getSeq($xetable, row, $rowIndex, column, $columnIndex);
28116
28201
  break;
28117
28202
 
28118
28203
  case 'checkbox':
@@ -28161,11 +28246,11 @@ function getLabelData($xetable, opts, columns, datas) {
28161
28246
  return rest;
28162
28247
  }
28163
28248
 
28164
- return datas.map(function (row, rowIndex) {
28249
+ return datas.map(function (row, $rowIndex) {
28165
28250
  var item = {
28166
28251
  _row: row
28167
28252
  };
28168
- columns.forEach(function (column, columnIndex) {
28253
+ columns.forEach(function (column, $columnIndex) {
28169
28254
  var cellValue = '';
28170
28255
  var renderOpts = column.editRender || column.cellRender;
28171
28256
  var exportLabelMethod = column.exportMethod;
@@ -28188,7 +28273,7 @@ function getLabelData($xetable, opts, columns, datas) {
28188
28273
  } else {
28189
28274
  switch (column.type) {
28190
28275
  case 'seq':
28191
- cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
28276
+ cellValue = mode === 'all' ? $rowIndex + 1 : getSeq($xetable, row, $rowIndex, column, $columnIndex);
28192
28277
  break;
28193
28278
 
28194
28279
  case 'checkbox':
@@ -30547,6 +30632,7 @@ function validErrorRuleValue(rule, val) {
30547
30632
  row: row,
30548
30633
  columnIndex: _this2.getColumnIndex(column),
30549
30634
  column: column,
30635
+ field: column.property,
30550
30636
  $table: _this2
30551
30637
  };
30552
30638
 
@@ -30694,6 +30780,7 @@ function validErrorRuleValue(rule, val) {
30694
30780
  rowIndex: _this3.getRowIndex(row),
30695
30781
  column: column,
30696
30782
  columnIndex: _this3.getColumnIndex(column),
30783
+ field: column.property,
30697
30784
  $table: _this3
30698
30785
  });
30699
30786
 
@@ -30977,6 +31064,18 @@ var cellType = 'header';
30977
31064
  elemStore["".concat(prefix, "xSpace")] = $refs.xSpace;
30978
31065
  elemStore["".concat(prefix, "repair")] = $refs.repair;
30979
31066
  },
31067
+ destroyed: function destroyed() {
31068
+ var $xetable = this.$parent,
31069
+ fixedType = this.fixedType;
31070
+ var elemStore = $xetable.elemStore;
31071
+ var prefix = "".concat(fixedType || 'main', "-header-");
31072
+ elemStore["".concat(prefix, "wrapper")] = null;
31073
+ elemStore["".concat(prefix, "table")] = null;
31074
+ elemStore["".concat(prefix, "colgroup")] = null;
31075
+ elemStore["".concat(prefix, "list")] = null;
31076
+ elemStore["".concat(prefix, "xSpace")] = null;
31077
+ elemStore["".concat(prefix, "repair")] = null;
31078
+ },
30980
31079
  render: function render(h) {
30981
31080
  var _this = this;
30982
31081
 
@@ -31346,6 +31445,17 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
31346
31445
  elemStore["".concat(prefix, "list")] = $refs.tfoot;
31347
31446
  elemStore["".concat(prefix, "xSpace")] = $refs.xSpace;
31348
31447
  },
31448
+ destroyed: function destroyed() {
31449
+ var $xetable = this.$parent,
31450
+ fixedType = this.fixedType;
31451
+ var elemStore = $xetable.elemStore;
31452
+ var prefix = "".concat(fixedType || 'main', "-footer-");
31453
+ elemStore["".concat(prefix, "wrapper")] = null;
31454
+ elemStore["".concat(prefix, "table")] = null;
31455
+ elemStore["".concat(prefix, "colgroup")] = null;
31456
+ elemStore["".concat(prefix, "list")] = null;
31457
+ elemStore["".concat(prefix, "xSpace")] = null;
31458
+ },
31349
31459
  render: function render(h) {
31350
31460
  var _e = this._e,
31351
31461
  $xetable = this.$parent,
@@ -32161,7 +32271,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32161
32271
  proxyConfig = this.proxyConfig;
32162
32272
 
32163
32273
  if (proxyConfig && (data || proxyOpts.form && formOpts.data)) {
32164
- console.error('[vxe-grid] There is a conflict between the props proxy-config and data.');
32274
+ UtilTools.error('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config']);
32165
32275
  }
32166
32276
 
32167
32277
  if (false) {}
@@ -32312,7 +32422,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
32312
32422
  handleActiveMethod: function handleActiveMethod(params) {
32313
32423
  var editConfig = this.editConfig;
32314
32424
  var activeMethod = editConfig ? editConfig.activeMethod : null;
32315
- return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod(params));
32425
+ return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod(_objectSpread2(_objectSpread2({}, params), {}, {
32426
+ $grid: this
32427
+ })));
32316
32428
  },
32317
32429
  initToolbar: function initToolbar() {
32318
32430
  var _this3 = this;
@@ -32522,6 +32634,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32522
32634
 
32523
32635
  sortList = defaultSort.map(function (item) {
32524
32636
  return {
32637
+ field: item.field,
32525
32638
  property: item.field,
32526
32639
  order: item.order
32527
32640
  };
@@ -36099,6 +36212,7 @@ function renderItems(h, _vm, itemList) {
36099
36212
  var hasEllipsis = showTitle || showTooltip || showEllipsis;
36100
36213
  var params = {
36101
36214
  data: data,
36215
+ field: field,
36102
36216
  property: field,
36103
36217
  item: item,
36104
36218
  $form: _vm
@@ -36432,6 +36546,7 @@ function renderItems(h, _vm, itemList) {
36432
36546
  evnt.preventDefault();
36433
36547
 
36434
36548
  if (!this.preventSubmit) {
36549
+ this.clearValidate();
36435
36550
  this.beginValidate(this.getItems()).then(function () {
36436
36551
  _this3.$emit('submit', {
36437
36552
  data: _this3.data,
@@ -36466,6 +36581,7 @@ function renderItems(h, _vm, itemList) {
36466
36581
  if (compConf && compConf.itemResetMethod) {
36467
36582
  compConf.itemResetMethod({
36468
36583
  data: data,
36584
+ field: field,
36469
36585
  property: field,
36470
36586
  item: item,
36471
36587
  $form: _this4
@@ -36576,6 +36692,7 @@ function renderItems(h, _vm, itemList) {
36576
36692
  return this.$nextTick();
36577
36693
  },
36578
36694
  validate: function validate(callback) {
36695
+ this.clearValidate();
36579
36696
  return this.beginValidate(this.getItems(), '', callback);
36580
36697
  },
36581
36698
  validateField: function validateField(field, callback) {
@@ -36592,7 +36709,6 @@ function renderItems(h, _vm, itemList) {
36592
36709
  var validRest = {};
36593
36710
  var validFields = [];
36594
36711
  var itemValids = [];
36595
- this.clearValidate();
36596
36712
  clearTimeout(this.showErrTime);
36597
36713
 
36598
36714
  if (data && formRules) {
@@ -36609,6 +36725,7 @@ function renderItems(h, _vm, itemList) {
36609
36725
  rule: rule,
36610
36726
  rules: rules,
36611
36727
  data: data,
36728
+ field: field,
36612
36729
  property: field,
36613
36730
  $form: _this7
36614
36731
  };
@@ -36700,6 +36817,7 @@ function renderItems(h, _vm, itemList) {
36700
36817
  rule: rule,
36701
36818
  rules: rules,
36702
36819
  data: data,
36820
+ field: property,
36703
36821
  property: property,
36704
36822
  $form: _this8
36705
36823
  });
@@ -37692,6 +37810,7 @@ var List = Object.assign(src_list, {
37692
37810
  name: 'VxePulldown',
37693
37811
  mixins: [size],
37694
37812
  props: {
37813
+ value: Boolean,
37695
37814
  disabled: Boolean,
37696
37815
  placement: String,
37697
37816
  size: {
@@ -37715,6 +37834,15 @@ var List = Object.assign(src_list, {
37715
37834
  isActivated: false
37716
37835
  };
37717
37836
  },
37837
+ watch: {
37838
+ value: function value(_value) {
37839
+ if (_value) {
37840
+ this.showPanel();
37841
+ } else {
37842
+ this.hidePanel();
37843
+ }
37844
+ }
37845
+ },
37718
37846
  created: function created() {
37719
37847
  GlobalEvent.on(this, 'mousewheel', this.handleGlobalMousewheelEvent);
37720
37848
  GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent);
@@ -37855,6 +37983,8 @@ var List = Object.assign(src_list, {
37855
37983
  setTimeout(function () {
37856
37984
  _this.visiblePanel = true;
37857
37985
 
37986
+ _this.$emit('update:input', true);
37987
+
37858
37988
  _this.updatePlacement();
37859
37989
 
37860
37990
  setTimeout(function () {
@@ -37876,6 +38006,7 @@ var List = Object.assign(src_list, {
37876
38006
  var _this2 = this;
37877
38007
 
37878
38008
  this.visiblePanel = false;
38009
+ this.$emit('update:input', false);
37879
38010
  return new Promise(function (resolve) {
37880
38011
  if (_this2.animatVisible) {
37881
38012
  _this2.hidePanelTimeout = setTimeout(function () {