@vxe-ui/plugin-menu 4.2.1 → 4.3.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.
@@ -19,7 +19,7 @@ var rowIndexOf = function rowIndexOf($table, rows, row) {
19
19
  };
20
20
  function handleFixedColumn(fixed) {
21
21
  return {
22
- menuMethod: function menuMethod(params) {
22
+ tableMenuMethod: function tableMenuMethod(params) {
23
23
  var $table = params.$table,
24
24
  column = params.column;
25
25
  _xeUtils["default"].eachTree([column], function (column) {
@@ -402,6 +402,7 @@ function selectMultipleRows() {
402
402
  modelValue: rowSize.value,
403
403
  min: 1,
404
404
  max: 100,
405
+ type: 'integer',
405
406
  align: 'center',
406
407
  controlConfig: {
407
408
  layout: 'default'
@@ -439,6 +440,24 @@ function selectMultipleRows() {
439
440
  }
440
441
  });
441
442
  }
443
+ /**
444
+ * 浏览器-刷新页面(对应按键F5)
445
+ */
446
+ function systemPageRefresh() {
447
+ location.reload();
448
+ }
449
+ /**
450
+ * 浏览器-前进
451
+ */
452
+ function systemPageforward() {
453
+ history.forward();
454
+ }
455
+ /**
456
+ * 浏览器-后退
457
+ */
458
+ function systemPageBack() {
459
+ history.back();
460
+ }
442
461
  function pluginSetup(options) {
443
462
  if (options && options.copy) {
444
463
  handleCopy = options.copy;
@@ -456,11 +475,11 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
456
475
  var pVersion = 4;
457
476
  var sVersion = 11;
458
477
  if (!VxeUI.checkVersion(VxeUI.tableVersion, pVersion, sVersion)) {
459
- console.error("[@vxe-ui/plugin-menu 4.2.1] ".concat(VxeUI.getI18n('vxe.error.errorVersion', ["vxe-table@".concat(VxeUI.tableVersion || '?'), "vxe-table v".concat(pVersion, ".").concat(sVersion, "+")]), " https://vxeui.com/other4/#/plugin-menu/install"));
478
+ console.error("[@vxe-ui/plugin-menu 4.3.0] ".concat(VxeUI.getI18n('vxe.error.errorVersion', ["vxe-table@".concat(VxeUI.tableVersion || '?'), "vxe-table v".concat(pVersion, ".").concat(sVersion, "+")]), " https://vxeui.com/other4/#/plugin-menu/install"));
460
479
  }
461
480
  } else {
462
481
  if (!/^(4)\./.test(VxeUI.uiVersion || VxeUI.tableVersion)) {
463
- console.error('[@vxe-ui/plugin-menu 4.2.1] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-menu/install');
482
+ console.error('[@vxe-ui/plugin-menu 4.3.0] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-menu/install');
464
483
  }
465
484
  }
466
485
  pluginSetup(options);
@@ -469,31 +488,37 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
469
488
  * 浏览器-刷新页面(对应按键F5)
470
489
  */
471
490
  SYSTEM_PAGE_REFRESH: {
472
- menuMethod: function menuMethod() {
473
- location.reload();
474
- }
491
+ tableMenuMethod: systemPageRefresh,
492
+ treeMenuMethod: systemPageRefresh,
493
+ calendarMenuMethod: systemPageRefresh,
494
+ menuMenuMethod: systemPageRefresh,
495
+ formDesignMenuMethod: systemPageRefresh
475
496
  },
476
497
  /**
477
498
  * 浏览器-前进
478
499
  */
479
500
  SYSTEM_PAGE_FORWARD: {
480
- menuMethod: function menuMethod() {
481
- history.forward();
482
- }
501
+ tableMenuMethod: systemPageforward,
502
+ treeMenuMethod: systemPageforward,
503
+ calendarMenuMethod: systemPageforward,
504
+ menuMenuMethod: systemPageforward,
505
+ formDesignMenuMethod: systemPageforward
483
506
  },
484
507
  /**
485
508
  * 浏览器-后退
486
509
  */
487
510
  SYSTEM_PAGE_BACK: {
488
- menuMethod: function menuMethod() {
489
- history.back();
490
- }
511
+ tableMenuMethod: systemPageBack,
512
+ treeMenuMethod: systemPageBack,
513
+ calendarMenuMethod: systemPageBack,
514
+ menuMenuMethod: systemPageBack,
515
+ formDesignMenuMethod: systemPageBack
491
516
  },
492
517
  /**
493
518
  * 清除单元格数据的值;如果启用 mouse-config.area 功能,则清除区域范围内的单元格数据
494
519
  */
495
520
  CLEAR_CELL: {
496
- menuMethod: function menuMethod(params) {
521
+ tableMenuMethod: function tableMenuMethod(params) {
497
522
  var $table = params.$table,
498
523
  row = params.row,
499
524
  column = params.column;
@@ -526,7 +551,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
526
551
  * 清除行数据的值
527
552
  */
528
553
  CLEAR_ROW: {
529
- menuMethod: function menuMethod(params) {
554
+ tableMenuMethod: function tableMenuMethod(params) {
530
555
  var $table = params.$table,
531
556
  row = params.row;
532
557
  if (row) {
@@ -538,7 +563,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
538
563
  * 清除复选框选中行数据的值
539
564
  */
540
565
  CLEAR_CHECKBOX_ROW: {
541
- menuMethod: function menuMethod(params) {
566
+ tableMenuMethod: function tableMenuMethod(params) {
542
567
  var $table = params.$table;
543
568
  $table.clearData($table.getCheckboxRecords());
544
569
  }
@@ -547,7 +572,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
547
572
  * 清除区域选择范围内数据的值
548
573
  */
549
574
  CLEAR_AREA_ROW: {
550
- menuMethod: function menuMethod(params) {
575
+ tableMenuMethod: function tableMenuMethod(params) {
551
576
  var $table = params.$table,
552
577
  row = params.row,
553
578
  column = params.column;
@@ -573,7 +598,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
573
598
  * 清除所有数据的值
574
599
  */
575
600
  CLEAR_ALL: {
576
- menuMethod: function menuMethod(params) {
601
+ tableMenuMethod: function tableMenuMethod(params) {
577
602
  var $table = params.$table;
578
603
  $table.clearData();
579
604
  }
@@ -582,7 +607,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
582
607
  * 选取所有区域
583
608
  */
584
609
  SELECT_ALL_AREA: {
585
- menuMethod: function menuMethod(params) {
610
+ tableMenuMethod: function tableMenuMethod(params) {
586
611
  var $table = params.$table;
587
612
  var tableProps = $table.props;
588
613
  var mouseConfig = tableProps.mouseConfig;
@@ -607,7 +632,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
607
632
  * 以当前单元格为起点,范围选取到左侧单元格
608
633
  */
609
634
  SELECT_AREA_TO_LEFT: {
610
- menuMethod: function menuMethod(params) {
635
+ tableMenuMethod: function tableMenuMethod(params) {
611
636
  var $table = params.$table,
612
637
  row = params.row,
613
638
  column = params.column;
@@ -649,7 +674,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
649
674
  * 以当前单元格为起点,范围选取到右侧单元格
650
675
  */
651
676
  SELECT_AREA_TO_RIGHT: {
652
- menuMethod: function menuMethod(params) {
677
+ tableMenuMethod: function tableMenuMethod(params) {
653
678
  var $table = params.$table,
654
679
  row = params.row,
655
680
  column = params.column;
@@ -691,7 +716,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
691
716
  * 以当前单元格为起点,范围选取到顶部单元格
692
717
  */
693
718
  SELECT_AREA_TO_TOP: {
694
- menuMethod: function menuMethod(params) {
719
+ tableMenuMethod: function tableMenuMethod(params) {
695
720
  var $table = params.$table,
696
721
  row = params.row,
697
722
  column = params.column;
@@ -733,14 +758,14 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
733
758
  * 以当前单元格为起点,范围选取到底部单元格
734
759
  */
735
760
  SELECT_AREA_TO_BOTTON: {
736
- menuMethod: function menuMethod(params) {
761
+ tableMenuMethod: function tableMenuMethod(params) {
737
762
  var $table = params.$table,
738
763
  row = params.row,
739
764
  column = params.column;
740
765
  var tableProps = $table.props;
741
766
  var mouseConfig = tableProps.mouseConfig;
742
- var _$table$getComputeMap10 = $table.getComputeMaps(),
743
- computeMouseOpts = _$table$getComputeMap10.computeMouseOpts;
767
+ var _$table$getComputeMap0 = $table.getComputeMaps(),
768
+ computeMouseOpts = _$table$getComputeMap0.computeMouseOpts;
744
769
  var mouseOpts = computeMouseOpts.value;
745
770
  if (row && column && mouseConfig && mouseOpts.area) {
746
771
  var _$table$getTableData6 = $table.getTableData(),
@@ -775,15 +800,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
775
800
  * 还原单元格数据的值;如果启用 mouse-config.area 功能,则还原区域范围内的单元格数据
776
801
  */
777
802
  REVERT_CELL: {
778
- menuMethod: function menuMethod(params) {
803
+ tableMenuMethod: function tableMenuMethod(params) {
779
804
  var $table = params.$table,
780
805
  row = params.row,
781
806
  column = params.column;
782
807
  if (row && column) {
783
808
  var tableProps = $table.props;
784
809
  var mouseConfig = tableProps.mouseConfig;
785
- var _$table$getComputeMap11 = $table.getComputeMaps(),
786
- computeMouseOpts = _$table$getComputeMap11.computeMouseOpts;
810
+ var _$table$getComputeMap1 = $table.getComputeMaps(),
811
+ computeMouseOpts = _$table$getComputeMap1.computeMouseOpts;
787
812
  var mouseOpts = computeMouseOpts.value;
788
813
  if (mouseConfig && mouseOpts.area) {
789
814
  var cellAreas = $table.getCellAreas();
@@ -808,7 +833,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
808
833
  * 还原行数据的值
809
834
  */
810
835
  REVERT_ROW: {
811
- menuMethod: function menuMethod(params) {
836
+ tableMenuMethod: function tableMenuMethod(params) {
812
837
  var $table = params.$table,
813
838
  row = params.row;
814
839
  if (row) {
@@ -820,7 +845,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
820
845
  * 还原复选框选中行数据的值
821
846
  */
822
847
  REVERT_CHECKBOX_ROW: {
823
- menuMethod: function menuMethod(params) {
848
+ tableMenuMethod: function tableMenuMethod(params) {
824
849
  var $table = params.$table;
825
850
  $table.revertData($table.getCheckboxRecords());
826
851
  }
@@ -829,7 +854,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
829
854
  * 还原所有数据的值
830
855
  */
831
856
  REVERT_ALL: {
832
- menuMethod: function menuMethod(params) {
857
+ tableMenuMethod: function tableMenuMethod(params) {
833
858
  var $table = params.$table;
834
859
  $table.revertData();
835
860
  }
@@ -838,7 +863,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
838
863
  * 复制列头标题
839
864
  */
840
865
  COPY_TITLE: {
841
- menuMethod: function menuMethod(params) {
866
+ tableMenuMethod: function tableMenuMethod(params) {
842
867
  var column = params.column;
843
868
  var text = column.getTitle();
844
869
  if (text) {
@@ -855,7 +880,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
855
880
  * 复制单元格数据的值;如果启用 mouse-config.area 功能,则复制区域范围内的单元格数据,支持 Excel 和 WPS
856
881
  */
857
882
  COPY_CELL: {
858
- menuMethod: function menuMethod(params) {
883
+ tableMenuMethod: function tableMenuMethod(params) {
859
884
  handleCopyOrCut(params);
860
885
  }
861
886
  },
@@ -863,7 +888,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
863
888
  * 剪贴单元格数据的值;如果启用 mouse-config.area 功能,则剪贴区域范围内的单元格数据,支持 Excel 和 WPS
864
889
  */
865
890
  CUT_CELL: {
866
- menuMethod: function menuMethod(params) {
891
+ tableMenuMethod: function tableMenuMethod(params) {
867
892
  handleCopyOrCut(params, true);
868
893
  }
869
894
  },
@@ -871,15 +896,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
871
896
  * 粘贴从表格中被复制的数据;如果启用 mouse-config.area 功能,则粘贴区域范围内的单元格数据,不支持读取剪贴板
872
897
  */
873
898
  PASTE_CELL: {
874
- menuMethod: function menuMethod(params) {
899
+ tableMenuMethod: function tableMenuMethod(params) {
875
900
  var $event = params.$event,
876
901
  $table = params.$table,
877
902
  row = params.row,
878
903
  column = params.column;
879
904
  var tableProps = $table.props;
880
905
  var mouseConfig = tableProps.mouseConfig;
881
- var _$table$getComputeMap12 = $table.getComputeMaps(),
882
- computeMouseOpts = _$table$getComputeMap12.computeMouseOpts;
906
+ var _$table$getComputeMap10 = $table.getComputeMaps(),
907
+ computeMouseOpts = _$table$getComputeMap10.computeMouseOpts;
883
908
  var mouseOpts = computeMouseOpts.value;
884
909
  if (mouseConfig && mouseOpts.area) {
885
910
  $table.triggerPasteCellAreaEvent($event);
@@ -896,7 +921,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
896
921
  * 如果启用 mouse-config.area 功能,如果所选区域内已存在合并单元格,则取消临时合并,否则临时合并
897
922
  */
898
923
  MERGE_OR_CLEAR: {
899
- menuMethod: function menuMethod(params) {
924
+ tableMenuMethod: function tableMenuMethod(params) {
900
925
  var $event = params.$event,
901
926
  $table = params.$table;
902
927
  var cellAreas = $table.getCellAreas();
@@ -935,7 +960,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
935
960
  * 如果启用 mouse-config.area 功能,临时合并区域范围内的单元格,不管是否存在已合并
936
961
  */
937
962
  MERGE_CELL: {
938
- menuMethod: function menuMethod(params) {
963
+ tableMenuMethod: function tableMenuMethod(params) {
939
964
  var $event = params.$event,
940
965
  $table = params.$table;
941
966
  var _$table$getTableData7 = $table.getTableData(),
@@ -986,7 +1011,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
986
1011
  * 如果启用 mouse-config.area 功能,清除区域范围内单元格的临时合并状态
987
1012
  */
988
1013
  CLEAR_MERGE_CELL: {
989
- menuMethod: function menuMethod(params) {
1014
+ tableMenuMethod: function tableMenuMethod(params) {
990
1015
  var $event = params.$event,
991
1016
  $table = params.$table;
992
1017
  var beenMerges = handleClearMergeCells(params);
@@ -1001,7 +1026,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1001
1026
  * 清除所有单元格及表尾的临时合并状态
1002
1027
  */
1003
1028
  CLEAR_ALL_MERGE: {
1004
- menuMethod: function menuMethod(params) {
1029
+ tableMenuMethod: function tableMenuMethod(params) {
1005
1030
  var $event = params.$event,
1006
1031
  $table = params.$table;
1007
1032
  var mergeCells = $table.getMergeCells();
@@ -1018,7 +1043,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1018
1043
  * 编辑单元格
1019
1044
  */
1020
1045
  EDIT_CELL: {
1021
- menuMethod: function menuMethod(params) {
1046
+ tableMenuMethod: function tableMenuMethod(params) {
1022
1047
  var $table = params.$table,
1023
1048
  row = params.row,
1024
1049
  column = params.column;
@@ -1034,7 +1059,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1034
1059
  * 编辑行
1035
1060
  */
1036
1061
  EDIT_ROW: {
1037
- menuMethod: function menuMethod(params) {
1062
+ tableMenuMethod: function tableMenuMethod(params) {
1038
1063
  var $table = params.$table,
1039
1064
  row = params.row;
1040
1065
  if ($table.setEditRow) {
@@ -1049,14 +1074,14 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1049
1074
  * 插入数据
1050
1075
  */
1051
1076
  INSERT_ROW: {
1052
- menuMethod: function menuMethod(params) {
1077
+ tableMenuMethod: function tableMenuMethod(params) {
1053
1078
  var $table = params.$table,
1054
1079
  menu = params.menu,
1055
1080
  column = params.column;
1056
1081
  var tableProps = $table.props;
1057
1082
  var mouseConfig = tableProps.mouseConfig;
1058
- var _$table$getComputeMap13 = $table.getComputeMaps(),
1059
- computeMouseOpts = _$table$getComputeMap13.computeMouseOpts;
1083
+ var _$table$getComputeMap11 = $table.getComputeMaps(),
1084
+ computeMouseOpts = _$table$getComputeMap11.computeMouseOpts;
1060
1085
  var mouseOpts = computeMouseOpts.value;
1061
1086
  $table.insert(menu.params || {}).then(function (_ref7) {
1062
1087
  var rows = _ref7.rows;
@@ -1075,15 +1100,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1075
1100
  * 插入数据到指定位置
1076
1101
  */
1077
1102
  INSERT_AT_ROW: {
1078
- menuMethod: function menuMethod(params) {
1103
+ tableMenuMethod: function tableMenuMethod(params) {
1079
1104
  var $table = params.$table,
1080
1105
  menu = params.menu,
1081
1106
  row = params.row,
1082
1107
  column = params.column;
1083
1108
  var tableProps = $table.props;
1084
1109
  var mouseConfig = tableProps.mouseConfig;
1085
- var _$table$getComputeMap14 = $table.getComputeMaps(),
1086
- computeMouseOpts = _$table$getComputeMap14.computeMouseOpts;
1110
+ var _$table$getComputeMap12 = $table.getComputeMaps(),
1111
+ computeMouseOpts = _$table$getComputeMap12.computeMouseOpts;
1087
1112
  var mouseOpts = computeMouseOpts.value;
1088
1113
  (row ? $table.insertAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref8) {
1089
1114
  var rows = _ref8.rows;
@@ -1102,15 +1127,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1102
1127
  * 插入多行数据
1103
1128
  */
1104
1129
  BATCH_INSERT_AT_ROW: {
1105
- menuMethod: function menuMethod(params) {
1130
+ tableMenuMethod: function tableMenuMethod(params) {
1106
1131
  var $table = params.$table,
1107
1132
  menu = params.menu,
1108
1133
  row = params.row,
1109
1134
  column = params.column;
1110
1135
  var tableProps = $table.props;
1111
1136
  var mouseConfig = tableProps.mouseConfig;
1112
- var _$table$getComputeMap15 = $table.getComputeMaps(),
1113
- computeMouseOpts = _$table$getComputeMap15.computeMouseOpts;
1137
+ var _$table$getComputeMap13 = $table.getComputeMaps(),
1138
+ computeMouseOpts = _$table$getComputeMap13.computeMouseOpts;
1114
1139
  var mouseOpts = computeMouseOpts.value;
1115
1140
  selectMultipleRows().then(function (_ref9) {
1116
1141
  var size = _ref9.size;
@@ -1118,8 +1143,8 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1118
1143
  var records = _xeUtils["default"].range(0, size).map(function () {
1119
1144
  return Object.assign({}, menu.params);
1120
1145
  });
1121
- (row ? $table.insertAt(records, row) : $table.insert(records)).then(function (_ref10) {
1122
- var rows = _ref10.rows;
1146
+ (row ? $table.insertAt(records, row) : $table.insert(records)).then(function (_ref0) {
1147
+ var rows = _ref0.rows;
1123
1148
  if (column && mouseConfig && mouseOpts.area) {
1124
1149
  $table.setCellAreas([{
1125
1150
  startRow: _xeUtils["default"].first(rows),
@@ -1137,18 +1162,18 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1137
1162
  * 插入数据到指定位置
1138
1163
  */
1139
1164
  INSERT_NEXT_AT_ROW: {
1140
- menuMethod: function menuMethod(params) {
1165
+ tableMenuMethod: function tableMenuMethod(params) {
1141
1166
  var $table = params.$table,
1142
1167
  menu = params.menu,
1143
1168
  row = params.row,
1144
1169
  column = params.column;
1145
1170
  var tableProps = $table.props;
1146
1171
  var mouseConfig = tableProps.mouseConfig;
1147
- var _$table$getComputeMap16 = $table.getComputeMaps(),
1148
- computeMouseOpts = _$table$getComputeMap16.computeMouseOpts;
1172
+ var _$table$getComputeMap14 = $table.getComputeMaps(),
1173
+ computeMouseOpts = _$table$getComputeMap14.computeMouseOpts;
1149
1174
  var mouseOpts = computeMouseOpts.value;
1150
- (row ? $table.insertNextAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref11) {
1151
- var rows = _ref11.rows;
1175
+ (row ? $table.insertNextAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref1) {
1176
+ var rows = _ref1.rows;
1152
1177
  if (column && mouseConfig && mouseOpts.area) {
1153
1178
  $table.setCellAreas([{
1154
1179
  startRow: _xeUtils["default"].first(rows),
@@ -1164,24 +1189,24 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1164
1189
  * 批量插入数据到指定位置
1165
1190
  */
1166
1191
  BATCH_INSERT_NEXT_AT_ROW: {
1167
- menuMethod: function menuMethod(params) {
1192
+ tableMenuMethod: function tableMenuMethod(params) {
1168
1193
  var $table = params.$table,
1169
1194
  menu = params.menu,
1170
1195
  row = params.row,
1171
1196
  column = params.column;
1172
1197
  var tableProps = $table.props;
1173
1198
  var mouseConfig = tableProps.mouseConfig;
1174
- var _$table$getComputeMap17 = $table.getComputeMaps(),
1175
- computeMouseOpts = _$table$getComputeMap17.computeMouseOpts;
1199
+ var _$table$getComputeMap15 = $table.getComputeMaps(),
1200
+ computeMouseOpts = _$table$getComputeMap15.computeMouseOpts;
1176
1201
  var mouseOpts = computeMouseOpts.value;
1177
- selectMultipleRows().then(function (_ref12) {
1178
- var size = _ref12.size;
1202
+ selectMultipleRows().then(function (_ref10) {
1203
+ var size = _ref10.size;
1179
1204
  if (size) {
1180
1205
  var records = _xeUtils["default"].range(0, size).map(function () {
1181
1206
  return Object.assign({}, menu.params);
1182
1207
  });
1183
- (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(function (_ref13) {
1184
- var rows = _ref13.rows;
1208
+ (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(function (_ref11) {
1209
+ var rows = _ref11.rows;
1185
1210
  if (column && mouseConfig && mouseOpts.area) {
1186
1211
  $table.setCellAreas([{
1187
1212
  startRow: _xeUtils["default"].first(rows),
@@ -1200,14 +1225,14 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1200
1225
  * @deprecated
1201
1226
  */
1202
1227
  INSERT_ACTIVED_ROW: {
1203
- menuMethod: function menuMethod(params) {
1228
+ tableMenuMethod: function tableMenuMethod(params) {
1204
1229
  var $table = params.$table,
1205
1230
  menu = params.menu,
1206
1231
  column = params.column;
1207
1232
  var args = menu.params || []; // [{}, 'field']
1208
1233
  var record = Object.assign({}, args[0] || {});
1209
- $table.insert(record).then(function (_ref14) {
1210
- var row = _ref14.row;
1234
+ $table.insert(record).then(function (_ref12) {
1235
+ var row = _ref12.row;
1211
1236
  if ($table.setEditCell) {
1212
1237
  $table.setEditCell(row, args[1] || column);
1213
1238
  } else {
@@ -1222,14 +1247,14 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1222
1247
  * @deprecated
1223
1248
  */
1224
1249
  INSERT_EDIT_ROW: {
1225
- menuMethod: function menuMethod(params) {
1250
+ tableMenuMethod: function tableMenuMethod(params) {
1226
1251
  var $table = params.$table,
1227
1252
  menu = params.menu,
1228
1253
  column = params.column;
1229
1254
  var args = menu.params || []; // [{}, 'field']
1230
1255
  var record = Object.assign({}, args[0] || {});
1231
- $table.insert(record).then(function (_ref15) {
1232
- var row = _ref15.row;
1256
+ $table.insert(record).then(function (_ref13) {
1257
+ var row = _ref13.row;
1233
1258
  if ($table.setEditCell) {
1234
1259
  $table.setEditCell(row, args[1] || column);
1235
1260
  } else {
@@ -1243,15 +1268,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1243
1268
  * 插入数据到指定位置并激活编辑状态
1244
1269
  */
1245
1270
  INSERT_AT_ACTIVED_ROW: {
1246
- menuMethod: function menuMethod(params) {
1271
+ tableMenuMethod: function tableMenuMethod(params) {
1247
1272
  var $table = params.$table,
1248
1273
  menu = params.menu,
1249
1274
  row = params.row,
1250
1275
  column = params.column;
1251
1276
  var args = menu.params || []; // [{}, 'field']
1252
1277
  var record = Object.assign({}, args[0] || {});
1253
- (row ? $table.insertAt(record, row) : $table.insert(record)).then(function (_ref16) {
1254
- var row = _ref16.row;
1278
+ (row ? $table.insertAt(record, row) : $table.insert(record)).then(function (_ref14) {
1279
+ var row = _ref14.row;
1255
1280
  if ($table.setEditCell) {
1256
1281
  $table.setEditCell(row, args[1] || column);
1257
1282
  } else {
@@ -1265,15 +1290,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1265
1290
  * 插入数据到指定位置并激活编辑状态
1266
1291
  */
1267
1292
  INSERT_AT_EDIT_ROW: {
1268
- menuMethod: function menuMethod(params) {
1293
+ tableMenuMethod: function tableMenuMethod(params) {
1269
1294
  var $table = params.$table,
1270
1295
  menu = params.menu,
1271
1296
  row = params.row,
1272
1297
  column = params.column;
1273
1298
  var args = menu.params || []; // [{}, 'field']
1274
1299
  var record = Object.assign({}, args[0] || {});
1275
- (row ? $table.insertAt(record, row) : $table.insert(record)).then(function (_ref17) {
1276
- var row = _ref17.row;
1300
+ (row ? $table.insertAt(record, row) : $table.insert(record)).then(function (_ref15) {
1301
+ var row = _ref15.row;
1277
1302
  if ($table.setEditCell) {
1278
1303
  $table.setEditCell(row, args[1] || column);
1279
1304
  } else {
@@ -1287,20 +1312,20 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1287
1312
  * 批量插入数据到指定位置并激活编辑状态
1288
1313
  */
1289
1314
  BATCH_INSERT_AT_EDIT_ROW: {
1290
- menuMethod: function menuMethod(params) {
1315
+ tableMenuMethod: function tableMenuMethod(params) {
1291
1316
  var $table = params.$table,
1292
1317
  menu = params.menu,
1293
1318
  row = params.row,
1294
1319
  column = params.column;
1295
1320
  var args = menu.params || []; // [{}, 'field']
1296
- selectMultipleRows().then(function (_ref18) {
1297
- var size = _ref18.size;
1321
+ selectMultipleRows().then(function (_ref16) {
1322
+ var size = _ref16.size;
1298
1323
  if (size) {
1299
1324
  var records = _xeUtils["default"].range(0, size).map(function () {
1300
1325
  return Object.assign({}, args[0]);
1301
1326
  });
1302
- (row ? $table.insertAt(records, row) : $table.insert(records)).then(function (_ref19) {
1303
- var row = _ref19.row;
1327
+ (row ? $table.insertAt(records, row) : $table.insert(records)).then(function (_ref17) {
1328
+ var row = _ref17.row;
1304
1329
  if ($table.setEditCell) {
1305
1330
  $table.setEditCell(row, args[1] || column);
1306
1331
  } else {
@@ -1316,15 +1341,15 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1316
1341
  * 插入数据到指定位置并激活编辑状态
1317
1342
  */
1318
1343
  INSERT_NEXT_AT_EDIT_ROW: {
1319
- menuMethod: function menuMethod(params) {
1344
+ tableMenuMethod: function tableMenuMethod(params) {
1320
1345
  var $table = params.$table,
1321
1346
  menu = params.menu,
1322
1347
  row = params.row,
1323
1348
  column = params.column;
1324
1349
  var args = menu.params || []; // [{}, 'field']
1325
1350
  var record = Object.assign({}, args[0] || {});
1326
- (row ? $table.insertNextAt(record, row) : $table.insert(record)).then(function (_ref20) {
1327
- var row = _ref20.row;
1351
+ (row ? $table.insertNextAt(record, row) : $table.insert(record)).then(function (_ref18) {
1352
+ var row = _ref18.row;
1328
1353
  if ($table.setEditCell) {
1329
1354
  $table.setEditCell(row, args[1] || column);
1330
1355
  } else {
@@ -1338,20 +1363,20 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1338
1363
  * 批量插入数据到指定位置并激活编辑状态
1339
1364
  */
1340
1365
  BATCH_INSERT_NEXT_AT_EDIT_ROW: {
1341
- menuMethod: function menuMethod(params) {
1366
+ tableMenuMethod: function tableMenuMethod(params) {
1342
1367
  var $table = params.$table,
1343
1368
  menu = params.menu,
1344
1369
  row = params.row,
1345
1370
  column = params.column;
1346
1371
  var args = menu.params || []; // [{}, 'field']
1347
- selectMultipleRows().then(function (_ref21) {
1348
- var size = _ref21.size;
1372
+ selectMultipleRows().then(function (_ref19) {
1373
+ var size = _ref19.size;
1349
1374
  if (size) {
1350
1375
  var records = _xeUtils["default"].range(0, size).map(function () {
1351
1376
  return Object.assign({}, args[0]);
1352
1377
  });
1353
- (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(function (_ref22) {
1354
- var row = _ref22.row;
1378
+ (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(function (_ref20) {
1379
+ var row = _ref20.row;
1355
1380
  if ($table.setEditCell) {
1356
1381
  $table.setEditCell(row, args[1] || column);
1357
1382
  } else {
@@ -1367,7 +1392,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1367
1392
  * 移除行数据
1368
1393
  */
1369
1394
  DELETE_ROW: {
1370
- menuMethod: function menuMethod(params) {
1395
+ tableMenuMethod: function tableMenuMethod(params) {
1371
1396
  var $table = params.$table,
1372
1397
  row = params.row;
1373
1398
  if (row) {
@@ -1379,13 +1404,13 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1379
1404
  * 如果启用 mouse-config.area 功能,移除所选区域行数据
1380
1405
  */
1381
1406
  DELETE_AREA_ROW: {
1382
- menuMethod: function menuMethod(params) {
1407
+ tableMenuMethod: function tableMenuMethod(params) {
1383
1408
  var $table = params.$table,
1384
1409
  row = params.row;
1385
1410
  var tableProps = $table.props;
1386
1411
  var mouseConfig = tableProps.mouseConfig;
1387
- var _$table$getComputeMap18 = $table.getComputeMaps(),
1388
- computeMouseOpts = _$table$getComputeMap18.computeMouseOpts;
1412
+ var _$table$getComputeMap16 = $table.getComputeMaps(),
1413
+ computeMouseOpts = _$table$getComputeMap16.computeMouseOpts;
1389
1414
  var mouseOpts = computeMouseOpts.value;
1390
1415
  if (mouseConfig && mouseOpts.area) {
1391
1416
  var cellAreas = $table.getCellAreas();
@@ -1404,7 +1429,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1404
1429
  * 移除复选框选中行数据
1405
1430
  */
1406
1431
  DELETE_CHECKBOX_ROW: {
1407
- menuMethod: function menuMethod(params) {
1432
+ tableMenuMethod: function tableMenuMethod(params) {
1408
1433
  var $table = params.$table;
1409
1434
  $table.removeCheckboxRow();
1410
1435
  }
@@ -1413,7 +1438,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1413
1438
  * 移除所有行数据
1414
1439
  */
1415
1440
  DELETE_ALL: {
1416
- menuMethod: function menuMethod(params) {
1441
+ tableMenuMethod: function tableMenuMethod(params) {
1417
1442
  var $table = params.$table;
1418
1443
  $table.remove();
1419
1444
  }
@@ -1422,7 +1447,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1422
1447
  * 清除所选列排序条件
1423
1448
  */
1424
1449
  CLEAR_SORT: {
1425
- menuMethod: function menuMethod(params) {
1450
+ tableMenuMethod: function tableMenuMethod(params) {
1426
1451
  var $event = params.$event,
1427
1452
  $table = params.$table,
1428
1453
  column = params.column;
@@ -1435,7 +1460,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1435
1460
  * 清除所有排序条件
1436
1461
  */
1437
1462
  CLEAR_ALL_SORT: {
1438
- menuMethod: function menuMethod(params) {
1463
+ tableMenuMethod: function tableMenuMethod(params) {
1439
1464
  var $event = params.$event,
1440
1465
  $table = params.$table;
1441
1466
  var sortList = $table.getSortColumns();
@@ -1451,7 +1476,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1451
1476
  * 按所选列的值升序
1452
1477
  */
1453
1478
  SORT_ASC: {
1454
- menuMethod: function menuMethod(params) {
1479
+ tableMenuMethod: function tableMenuMethod(params) {
1455
1480
  var $event = params.$event,
1456
1481
  $table = params.$table,
1457
1482
  column = params.column;
@@ -1464,7 +1489,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1464
1489
  * 按所选列的值倒序
1465
1490
  */
1466
1491
  SORT_DESC: {
1467
- menuMethod: function menuMethod(params) {
1492
+ tableMenuMethod: function tableMenuMethod(params) {
1468
1493
  var $event = params.$event,
1469
1494
  $table = params.$table,
1470
1495
  column = params.column;
@@ -1477,7 +1502,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1477
1502
  * 清除复选框选中列的筛选条件
1478
1503
  */
1479
1504
  CLEAR_FILTER: {
1480
- menuMethod: function menuMethod(params) {
1505
+ tableMenuMethod: function tableMenuMethod(params) {
1481
1506
  var $event = params.$event,
1482
1507
  $table = params.$table,
1483
1508
  column = params.column;
@@ -1491,7 +1516,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1491
1516
  * 清除所有列筛选条件
1492
1517
  */
1493
1518
  CLEAR_ALL_FILTER: {
1494
- menuMethod: function menuMethod(params) {
1519
+ tableMenuMethod: function tableMenuMethod(params) {
1495
1520
  var $event = params.$event,
1496
1521
  $table = params.$table;
1497
1522
  var filterList = $table.getCheckedFilters();
@@ -1507,7 +1532,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1507
1532
  * 根据单元格值筛选
1508
1533
  */
1509
1534
  FILTER_CELL: {
1510
- menuMethod: function menuMethod(params) {
1535
+ tableMenuMethod: function tableMenuMethod(params) {
1511
1536
  var $table = params.$table,
1512
1537
  row = params.row,
1513
1538
  column = params.column;
@@ -1527,7 +1552,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1527
1552
  * 导出行数据
1528
1553
  */
1529
1554
  EXPORT_ROW: {
1530
- menuMethod: function menuMethod(params) {
1555
+ tableMenuMethod: function tableMenuMethod(params) {
1531
1556
  var $table = params.$table,
1532
1557
  menu = params.menu,
1533
1558
  row = params.row;
@@ -1543,7 +1568,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1543
1568
  * 导出复选框选中行数据
1544
1569
  */
1545
1570
  EXPORT_CHECKBOX_ROW: {
1546
- menuMethod: function menuMethod(params) {
1571
+ tableMenuMethod: function tableMenuMethod(params) {
1547
1572
  var $table = params.$table,
1548
1573
  menu = params.menu;
1549
1574
  var opts = {
@@ -1556,7 +1581,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1556
1581
  * 导出所有行数据
1557
1582
  */
1558
1583
  EXPORT_ALL: {
1559
- menuMethod: function menuMethod(params) {
1584
+ tableMenuMethod: function tableMenuMethod(params) {
1560
1585
  var $table = params.$table,
1561
1586
  menu = params.menu;
1562
1587
  $table.exportData(menu.params);
@@ -1566,7 +1591,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1566
1591
  * 打印所有行数据
1567
1592
  */
1568
1593
  PRINT_ALL: {
1569
- menuMethod: function menuMethod(params) {
1594
+ tableMenuMethod: function tableMenuMethod(params) {
1570
1595
  var $table = params.$table,
1571
1596
  menu = params.menu;
1572
1597
  $table.print(menu.params);
@@ -1576,7 +1601,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1576
1601
  * 打印复选框选中行
1577
1602
  */
1578
1603
  PRINT_CHECKBOX_ROW: {
1579
- menuMethod: function menuMethod(params) {
1604
+ tableMenuMethod: function tableMenuMethod(params) {
1580
1605
  var $table = params.$table,
1581
1606
  menu = params.menu;
1582
1607
  var opts = {
@@ -1589,7 +1614,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1589
1614
  * 打开查找功能
1590
1615
  */
1591
1616
  OPEN_FIND: {
1592
- menuMethod: function menuMethod(params) {
1617
+ tableMenuMethod: function tableMenuMethod(params) {
1593
1618
  var $event = params.$event,
1594
1619
  $table = params.$table;
1595
1620
  $table.triggerFNROpenEvent($event, 'find');
@@ -1599,7 +1624,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1599
1624
  * 打开替换功能
1600
1625
  */
1601
1626
  OPEN_REPLACE: {
1602
- menuMethod: function menuMethod(params) {
1627
+ tableMenuMethod: function tableMenuMethod(params) {
1603
1628
  var $event = params.$event,
1604
1629
  $table = params.$table;
1605
1630
  $table.triggerFNROpenEvent($event, 'replace');
@@ -1609,7 +1634,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1609
1634
  * 隐藏当前列
1610
1635
  */
1611
1636
  HIDDEN_COLUMN: {
1612
- menuMethod: function menuMethod(params) {
1637
+ tableMenuMethod: function tableMenuMethod(params) {
1613
1638
  var $table = params.$table,
1614
1639
  column = params.column;
1615
1640
  if (column) {
@@ -1633,7 +1658,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1633
1658
  * 重置列的可视状态
1634
1659
  */
1635
1660
  RESET_COLUMN: {
1636
- menuMethod: function menuMethod(params) {
1661
+ tableMenuMethod: function tableMenuMethod(params) {
1637
1662
  var $table = params.$table;
1638
1663
  $table.resetColumn({
1639
1664
  visible: true,
@@ -1645,7 +1670,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1645
1670
  * 重置列宽状态
1646
1671
  */
1647
1672
  RESET_RESIZABLE: {
1648
- menuMethod: function menuMethod(params) {
1673
+ tableMenuMethod: function tableMenuMethod(params) {
1649
1674
  var $table = params.$table;
1650
1675
  $table.resetColumn({
1651
1676
  visible: false,
@@ -1657,7 +1682,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1657
1682
  * 重置列的所有状态
1658
1683
  */
1659
1684
  RESET_ALL: {
1660
- menuMethod: function menuMethod(params) {
1685
+ tableMenuMethod: function tableMenuMethod(params) {
1661
1686
  var $table = params.$table;
1662
1687
  $table.resetColumn(true);
1663
1688
  }
@@ -1666,31 +1691,31 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1666
1691
  * 用于 proxy-config,重新初始化,恢复到初始状态,触发对应的 ajax.query
1667
1692
  */
1668
1693
  COMMIT_PROXY_INITIAL: {
1669
- menuMethod: createCommitHandle('initial')
1694
+ tableMenuMethod: createCommitHandle('initial')
1670
1695
  },
1671
1696
  /**
1672
1697
  * 用于 proxy-config,重新加载,如果有分页,返回第一页,触发对应的 ajax.query
1673
1698
  */
1674
1699
  COMMIT_PROXY_QUERY: {
1675
- menuMethod: createCommitHandle('query')
1700
+ tableMenuMethod: createCommitHandle('query')
1676
1701
  },
1677
1702
  /**
1678
1703
  * 用于 proxy-config,刷新当前页,触发对应的 ajax.quer
1679
1704
  */
1680
1705
  COMMIT_PROXY_RELOAD: {
1681
- menuMethod: createCommitHandle('reload')
1706
+ tableMenuMethod: createCommitHandle('reload')
1682
1707
  },
1683
1708
  /**
1684
1709
  * 用于 proxy-config,直接删除,触发对应的 ajax.delete
1685
1710
  */
1686
1711
  COMMIT_PROXY_DELETE: {
1687
- menuMethod: createCommitHandle('delete')
1712
+ tableMenuMethod: createCommitHandle('delete')
1688
1713
  },
1689
1714
  /**
1690
1715
  * 用于 proxy-config,保存数据,触发对应的 ajax.save
1691
1716
  */
1692
1717
  COMMIT_PROXY_SAVE: {
1693
- menuMethod: createCommitHandle('save')
1718
+ tableMenuMethod: createCommitHandle('save')
1694
1719
  }
1695
1720
  });
1696
1721
  VxeUI.interceptor.add('event.showMenu', handlePrivilegeEvent);