@vxe-ui/plugin-menu 4.3.2 → 4.4.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/lib/index.js CHANGED
@@ -4,11 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = exports.VxeUIPluginMenu = void 0;
7
+ exports.hasEnableConf = hasEnableConf;
7
8
  var _xeUtils = _interopRequireDefault(require("xe-utils"));
8
9
  var _vue = require("vue");
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  var VxeUI;
11
12
  var handleCopy;
13
+ /**
14
+ * 用于开关类型的配置项
15
+ * 局部启用规则:conf={}
16
+ * 局部禁用规则:conf={enabled:false}
17
+ * 全局默认启用规则:conf.enabled=true
18
+ */
19
+ function hasEnableConf(conf, opts) {
20
+ return opts && (conf ? opts.enabled !== false : opts.enabled);
21
+ }
12
22
  var columnIndexOf = function columnIndexOf(cols, column) {
13
23
  return _xeUtils["default"].findIndexOf(cols, function (item) {
14
24
  return item.id === column.id;
@@ -88,8 +98,8 @@ function handleCopyOrCut(params, isCut) {
88
98
  var _$table$getComputeMap = $table.getComputeMaps(),
89
99
  computeMouseOpts = _$table$getComputeMap.computeMouseOpts;
90
100
  var mouseOpts = computeMouseOpts.value;
91
- var text = '';
92
- if (mouseConfig && mouseOpts.area) {
101
+ var text;
102
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
93
103
  if (isCut) {
94
104
  $table.triggerCutCellAreaEvent($event);
95
105
  } else {
@@ -159,7 +169,7 @@ function getBeenMerges(params) {
159
169
  visibleData = _$table$getTableData2.visibleData;
160
170
  var _$table$getTableColum2 = $table.getTableColumn(),
161
171
  visibleColumn = _$table$getTableColum2.visibleColumn;
162
- var cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
172
+ var cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
163
173
  var mergeList = $table.getMergeCells();
164
174
  return mergeList.filter(function (_ref) {
165
175
  var mergeRowIndex = _ref.row,
@@ -251,10 +261,14 @@ function checkPrivilege(item, params) {
251
261
  }
252
262
  case 'EDIT_CELL':
253
263
  case 'CLEAR_CELL':
264
+ case 'CLEAR_AREA_CELL':
254
265
  case 'CLEAR_ROW':
255
266
  case 'COPY_CELL':
267
+ case 'COPY_AREA_CELL':
256
268
  case 'CUT_CELL':
269
+ case 'CUT_AREA_CELL':
257
270
  case 'PASTE_CELL':
271
+ case 'PASTE_AREA_CELL':
258
272
  case 'MERGE_OR_CLEAR':
259
273
  case 'MERGE_CELL':
260
274
  case 'REVERT_CELL':
@@ -316,7 +330,7 @@ function checkPrivilege(item, params) {
316
330
  case 'OPEN_FIND':
317
331
  case 'OPEN_REPLACE':
318
332
  {
319
- item.disabled = !(mouseConfig && mouseOpts.area);
333
+ item.disabled = !(hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area);
320
334
  break;
321
335
  }
322
336
  case 'EDIT_CELL':
@@ -325,14 +339,18 @@ function checkPrivilege(item, params) {
325
339
  break;
326
340
  }
327
341
  case 'COPY_CELL':
342
+ case 'COPY_AREA_CELL':
328
343
  case 'CUT_CELL':
344
+ case 'CUT_AREA_CELL':
329
345
  case 'PASTE_CELL':
346
+ case 'PASTE_AREA_CELL':
330
347
  {
331
- var cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
348
+ var cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
332
349
  item.disabled = cellAreas.length > 1;
333
350
  if (!item.disabled) {
334
351
  switch (code) {
335
352
  case 'PASTE_CELL':
353
+ case 'PASTE_AREA_CELL':
336
354
  {
337
355
  var clipboard = getClipboardObj();
338
356
  item.disabled = !clipboard || !clipboard.text;
@@ -345,7 +363,7 @@ function checkPrivilege(item, params) {
345
363
  case 'MERGE_OR_CLEAR':
346
364
  case 'MERGE_CELL':
347
365
  {
348
- var _cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
366
+ var _cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
349
367
  item.disabled = !_cellAreas.length || _cellAreas.length === 1 && _cellAreas[0].rows.length === 1 && _cellAreas[0].cols.length === 1 || !checkCellOverlay(params, _cellAreas);
350
368
  break;
351
369
  }
@@ -475,11 +493,11 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
475
493
  var pVersion = 4;
476
494
  var sVersion = 11;
477
495
  if (!VxeUI.checkVersion(VxeUI.tableVersion, pVersion, sVersion)) {
478
- console.error("[@vxe-ui/plugin-menu 4.3.2] ".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"));
496
+ console.error("[@vxe-ui/plugin-menu 4.4.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"));
479
497
  }
480
498
  } else {
481
499
  if (!/^(4)\./.test(VxeUI.uiVersion || VxeUI.tableVersion)) {
482
- console.error('[@vxe-ui/plugin-menu 4.3.2] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-menu/install');
500
+ console.error('[@vxe-ui/plugin-menu 4.4.0] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-menu/install');
483
501
  }
484
502
  }
485
503
  pluginSetup(options);
@@ -528,7 +546,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
528
546
  var _$table$getComputeMap4 = $table.getComputeMaps(),
529
547
  computeMouseOpts = _$table$getComputeMap4.computeMouseOpts;
530
548
  var mouseOpts = computeMouseOpts.value;
531
- if (mouseConfig && mouseOpts.area) {
549
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
532
550
  var cellAreas = $table.getCellAreas();
533
551
  if (cellAreas && cellAreas.length) {
534
552
  cellAreas.forEach(function (areaItem) {
@@ -547,6 +565,37 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
547
565
  }
548
566
  }
549
567
  },
568
+ /**
569
+ * 用于 mouse-config.area 功能,清除区域范围内的单元格数据
570
+ */
571
+ CLEAR_AREA_CELL: {
572
+ tableMenuMethod: function tableMenuMethod(params) {
573
+ var $table = params.$table,
574
+ row = params.row,
575
+ column = params.column;
576
+ if (row && column) {
577
+ var tableProps = $table.props;
578
+ var mouseConfig = tableProps.mouseConfig;
579
+ var _$table$getComputeMap5 = $table.getComputeMaps(),
580
+ computeMouseOpts = _$table$getComputeMap5.computeMouseOpts;
581
+ var mouseOpts = computeMouseOpts.value;
582
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
583
+ var cellAreas = $table.getCellAreas();
584
+ if (cellAreas && cellAreas.length) {
585
+ cellAreas.forEach(function (areaItem) {
586
+ var rows = areaItem.rows,
587
+ cols = areaItem.cols;
588
+ cols.forEach(function (column) {
589
+ rows.forEach(function (row) {
590
+ $table.clearData(row, column.field);
591
+ });
592
+ });
593
+ });
594
+ }
595
+ }
596
+ }
597
+ }
598
+ },
550
599
  /**
551
600
  * 清除行数据的值
552
601
  */
@@ -578,11 +627,11 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
578
627
  column = params.column;
579
628
  var tableProps = $table.props;
580
629
  var mouseConfig = tableProps.mouseConfig;
581
- var _$table$getComputeMap5 = $table.getComputeMaps(),
582
- computeMouseOpts = _$table$getComputeMap5.computeMouseOpts;
630
+ var _$table$getComputeMap6 = $table.getComputeMaps(),
631
+ computeMouseOpts = _$table$getComputeMap6.computeMouseOpts;
583
632
  var mouseOpts = computeMouseOpts.value;
584
- if (mouseConfig && mouseOpts.area) {
585
- var cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
633
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
634
+ var cellAreas = mouseOpts.area ? $table.getCellAreas() : [];
586
635
  cellAreas.forEach(function (areaItem) {
587
636
  var rows = areaItem.rows;
588
637
  $table.clearData(rows);
@@ -611,10 +660,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
611
660
  var $table = params.$table;
612
661
  var tableProps = $table.props;
613
662
  var mouseConfig = tableProps.mouseConfig;
614
- var _$table$getComputeMap6 = $table.getComputeMaps(),
615
- computeMouseOpts = _$table$getComputeMap6.computeMouseOpts;
663
+ var _$table$getComputeMap7 = $table.getComputeMaps(),
664
+ computeMouseOpts = _$table$getComputeMap7.computeMouseOpts;
616
665
  var mouseOpts = computeMouseOpts.value;
617
- if (mouseConfig && mouseOpts.area) {
666
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
618
667
  var _$table$getTableData4 = $table.getTableData(),
619
668
  visibleData = _$table$getTableData4.visibleData;
620
669
  var _$table$getTableColum4 = $table.getTableColumn(),
@@ -638,10 +687,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
638
687
  column = params.column;
639
688
  var tableProps = $table.props;
640
689
  var mouseConfig = tableProps.mouseConfig;
641
- var _$table$getComputeMap7 = $table.getComputeMaps(),
642
- computeMouseOpts = _$table$getComputeMap7.computeMouseOpts;
690
+ var _$table$getComputeMap8 = $table.getComputeMaps(),
691
+ computeMouseOpts = _$table$getComputeMap8.computeMouseOpts;
643
692
  var mouseOpts = computeMouseOpts.value;
644
- if (row && column && mouseConfig && mouseOpts.area) {
693
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
645
694
  var _$table$getTableColum5 = $table.getTableColumn(),
646
695
  visibleColumn = _$table$getTableColum5.visibleColumn;
647
696
  var cellAreas = $table.getCellAreas();
@@ -680,10 +729,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
680
729
  column = params.column;
681
730
  var tableProps = $table.props;
682
731
  var mouseConfig = tableProps.mouseConfig;
683
- var _$table$getComputeMap8 = $table.getComputeMaps(),
684
- computeMouseOpts = _$table$getComputeMap8.computeMouseOpts;
732
+ var _$table$getComputeMap9 = $table.getComputeMaps(),
733
+ computeMouseOpts = _$table$getComputeMap9.computeMouseOpts;
685
734
  var mouseOpts = computeMouseOpts.value;
686
- if (row && column && mouseConfig && mouseOpts.area) {
735
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
687
736
  var _$table$getTableColum6 = $table.getTableColumn(),
688
737
  visibleColumn = _$table$getTableColum6.visibleColumn;
689
738
  var cellAreas = $table.getCellAreas();
@@ -722,10 +771,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
722
771
  column = params.column;
723
772
  var tableProps = $table.props;
724
773
  var mouseConfig = tableProps.mouseConfig;
725
- var _$table$getComputeMap9 = $table.getComputeMaps(),
726
- computeMouseOpts = _$table$getComputeMap9.computeMouseOpts;
774
+ var _$table$getComputeMap0 = $table.getComputeMaps(),
775
+ computeMouseOpts = _$table$getComputeMap0.computeMouseOpts;
727
776
  var mouseOpts = computeMouseOpts.value;
728
- if (row && column && mouseConfig && mouseOpts.area) {
777
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
729
778
  var _$table$getTableData5 = $table.getTableData(),
730
779
  visibleData = _$table$getTableData5.visibleData;
731
780
  var cellAreas = $table.getCellAreas();
@@ -764,10 +813,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
764
813
  column = params.column;
765
814
  var tableProps = $table.props;
766
815
  var mouseConfig = tableProps.mouseConfig;
767
- var _$table$getComputeMap0 = $table.getComputeMaps(),
768
- computeMouseOpts = _$table$getComputeMap0.computeMouseOpts;
816
+ var _$table$getComputeMap1 = $table.getComputeMaps(),
817
+ computeMouseOpts = _$table$getComputeMap1.computeMouseOpts;
769
818
  var mouseOpts = computeMouseOpts.value;
770
- if (row && column && mouseConfig && mouseOpts.area) {
819
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
771
820
  var _$table$getTableData6 = $table.getTableData(),
772
821
  visibleData = _$table$getTableData6.visibleData;
773
822
  var cellAreas = $table.getCellAreas();
@@ -807,10 +856,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
807
856
  if (row && column) {
808
857
  var tableProps = $table.props;
809
858
  var mouseConfig = tableProps.mouseConfig;
810
- var _$table$getComputeMap1 = $table.getComputeMaps(),
811
- computeMouseOpts = _$table$getComputeMap1.computeMouseOpts;
859
+ var _$table$getComputeMap10 = $table.getComputeMaps(),
860
+ computeMouseOpts = _$table$getComputeMap10.computeMouseOpts;
812
861
  var mouseOpts = computeMouseOpts.value;
813
- if (mouseConfig && mouseOpts.area) {
862
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
814
863
  var cellAreas = $table.getCellAreas();
815
864
  if (cellAreas && cellAreas.length) {
816
865
  cellAreas.forEach(function (areaItem) {
@@ -884,6 +933,14 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
884
933
  handleCopyOrCut(params);
885
934
  }
886
935
  },
936
+ /**
937
+ * 复制单元格数据的值;用于 mouse-config.area 功能,复制区域范围内的单元格数据,支持 Excel 和 WPS
938
+ */
939
+ COPY_AREA_CELL: {
940
+ tableMenuMethod: function tableMenuMethod(params) {
941
+ handleCopyOrCut(params);
942
+ }
943
+ },
887
944
  /**
888
945
  * 剪贴单元格数据的值;如果启用 mouse-config.area 功能,则剪贴区域范围内的单元格数据,支持 Excel 和 WPS
889
946
  */
@@ -892,6 +949,14 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
892
949
  handleCopyOrCut(params, true);
893
950
  }
894
951
  },
952
+ /**
953
+ * 剪贴单元格数据的值;用于 mouse-config.area 功能,剪贴区域范围内的单元格数据,支持 Excel 和 WPS
954
+ */
955
+ CUT_AREA_CELL: {
956
+ tableMenuMethod: function tableMenuMethod(params) {
957
+ handleCopyOrCut(params, true);
958
+ }
959
+ },
895
960
  /**
896
961
  * 粘贴从表格中被复制的数据;如果启用 mouse-config.area 功能,则粘贴区域范围内的单元格数据,不支持读取剪贴板
897
962
  */
@@ -903,10 +968,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
903
968
  column = params.column;
904
969
  var tableProps = $table.props;
905
970
  var mouseConfig = tableProps.mouseConfig;
906
- var _$table$getComputeMap10 = $table.getComputeMaps(),
907
- computeMouseOpts = _$table$getComputeMap10.computeMouseOpts;
971
+ var _$table$getComputeMap11 = $table.getComputeMaps(),
972
+ computeMouseOpts = _$table$getComputeMap11.computeMouseOpts;
908
973
  var mouseOpts = computeMouseOpts.value;
909
- if (mouseConfig && mouseOpts.area) {
974
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
910
975
  $table.triggerPasteCellAreaEvent($event);
911
976
  } else {
912
977
  var clipboard = getClipboardObj();
@@ -917,6 +982,23 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
917
982
  }
918
983
  }
919
984
  },
985
+ /**
986
+ * 粘贴从表格中被复制的数据;用于 mouse-config.area 功能,粘贴区域范围内的单元格数据,不支持读取剪贴板
987
+ */
988
+ PASTE_AREA_CELL: {
989
+ tableMenuMethod: function tableMenuMethod(params) {
990
+ var $event = params.$event,
991
+ $table = params.$table;
992
+ var tableProps = $table.props;
993
+ var mouseConfig = tableProps.mouseConfig;
994
+ var _$table$getComputeMap12 = $table.getComputeMaps(),
995
+ computeMouseOpts = _$table$getComputeMap12.computeMouseOpts;
996
+ var mouseOpts = computeMouseOpts.value;
997
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
998
+ $table.triggerPasteCellAreaEvent($event);
999
+ }
1000
+ }
1001
+ },
920
1002
  /**
921
1003
  * 如果启用 mouse-config.area 功能,如果所选区域内已存在合并单元格,则取消临时合并,否则临时合并
922
1004
  */
@@ -1080,12 +1162,12 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1080
1162
  column = params.column;
1081
1163
  var tableProps = $table.props;
1082
1164
  var mouseConfig = tableProps.mouseConfig;
1083
- var _$table$getComputeMap11 = $table.getComputeMaps(),
1084
- computeMouseOpts = _$table$getComputeMap11.computeMouseOpts;
1165
+ var _$table$getComputeMap13 = $table.getComputeMaps(),
1166
+ computeMouseOpts = _$table$getComputeMap13.computeMouseOpts;
1085
1167
  var mouseOpts = computeMouseOpts.value;
1086
1168
  $table.insert(menu.params || {}).then(function (_ref7) {
1087
1169
  var rows = _ref7.rows;
1088
- if (column && mouseConfig && mouseOpts.area) {
1170
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1089
1171
  $table.setCellAreas([{
1090
1172
  startRow: _xeUtils["default"].first(rows),
1091
1173
  endRow: _xeUtils["default"].last(rows),
@@ -1107,12 +1189,12 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1107
1189
  column = params.column;
1108
1190
  var tableProps = $table.props;
1109
1191
  var mouseConfig = tableProps.mouseConfig;
1110
- var _$table$getComputeMap12 = $table.getComputeMaps(),
1111
- computeMouseOpts = _$table$getComputeMap12.computeMouseOpts;
1192
+ var _$table$getComputeMap14 = $table.getComputeMaps(),
1193
+ computeMouseOpts = _$table$getComputeMap14.computeMouseOpts;
1112
1194
  var mouseOpts = computeMouseOpts.value;
1113
1195
  (row ? $table.insertAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref8) {
1114
1196
  var rows = _ref8.rows;
1115
- if (column && mouseConfig && mouseOpts.area) {
1197
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1116
1198
  $table.setCellAreas([{
1117
1199
  startRow: _xeUtils["default"].first(rows),
1118
1200
  endRow: _xeUtils["default"].last(rows),
@@ -1134,8 +1216,8 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1134
1216
  column = params.column;
1135
1217
  var tableProps = $table.props;
1136
1218
  var mouseConfig = tableProps.mouseConfig;
1137
- var _$table$getComputeMap13 = $table.getComputeMaps(),
1138
- computeMouseOpts = _$table$getComputeMap13.computeMouseOpts;
1219
+ var _$table$getComputeMap15 = $table.getComputeMaps(),
1220
+ computeMouseOpts = _$table$getComputeMap15.computeMouseOpts;
1139
1221
  var mouseOpts = computeMouseOpts.value;
1140
1222
  selectMultipleRows().then(function (_ref9) {
1141
1223
  var size = _ref9.size;
@@ -1145,7 +1227,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1145
1227
  });
1146
1228
  (row ? $table.insertAt(records, row) : $table.insert(records)).then(function (_ref0) {
1147
1229
  var rows = _ref0.rows;
1148
- if (column && mouseConfig && mouseOpts.area) {
1230
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1149
1231
  $table.setCellAreas([{
1150
1232
  startRow: _xeUtils["default"].first(rows),
1151
1233
  endRow: _xeUtils["default"].last(rows),
@@ -1169,12 +1251,12 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1169
1251
  column = params.column;
1170
1252
  var tableProps = $table.props;
1171
1253
  var mouseConfig = tableProps.mouseConfig;
1172
- var _$table$getComputeMap14 = $table.getComputeMaps(),
1173
- computeMouseOpts = _$table$getComputeMap14.computeMouseOpts;
1254
+ var _$table$getComputeMap16 = $table.getComputeMaps(),
1255
+ computeMouseOpts = _$table$getComputeMap16.computeMouseOpts;
1174
1256
  var mouseOpts = computeMouseOpts.value;
1175
1257
  (row ? $table.insertNextAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref1) {
1176
1258
  var rows = _ref1.rows;
1177
- if (column && mouseConfig && mouseOpts.area) {
1259
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1178
1260
  $table.setCellAreas([{
1179
1261
  startRow: _xeUtils["default"].first(rows),
1180
1262
  endRow: _xeUtils["default"].last(rows),
@@ -1196,8 +1278,8 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1196
1278
  column = params.column;
1197
1279
  var tableProps = $table.props;
1198
1280
  var mouseConfig = tableProps.mouseConfig;
1199
- var _$table$getComputeMap15 = $table.getComputeMaps(),
1200
- computeMouseOpts = _$table$getComputeMap15.computeMouseOpts;
1281
+ var _$table$getComputeMap17 = $table.getComputeMaps(),
1282
+ computeMouseOpts = _$table$getComputeMap17.computeMouseOpts;
1201
1283
  var mouseOpts = computeMouseOpts.value;
1202
1284
  selectMultipleRows().then(function (_ref10) {
1203
1285
  var size = _ref10.size;
@@ -1207,7 +1289,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1207
1289
  });
1208
1290
  (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(function (_ref11) {
1209
1291
  var rows = _ref11.rows;
1210
- if (column && mouseConfig && mouseOpts.area) {
1292
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1211
1293
  $table.setCellAreas([{
1212
1294
  startRow: _xeUtils["default"].first(rows),
1213
1295
  endRow: _xeUtils["default"].last(rows),
@@ -1409,10 +1491,10 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1409
1491
  row = params.row;
1410
1492
  var tableProps = $table.props;
1411
1493
  var mouseConfig = tableProps.mouseConfig;
1412
- var _$table$getComputeMap16 = $table.getComputeMaps(),
1413
- computeMouseOpts = _$table$getComputeMap16.computeMouseOpts;
1494
+ var _$table$getComputeMap18 = $table.getComputeMaps(),
1495
+ computeMouseOpts = _$table$getComputeMap18.computeMouseOpts;
1414
1496
  var mouseOpts = computeMouseOpts.value;
1415
- if (mouseConfig && mouseOpts.area) {
1497
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1416
1498
  var cellAreas = $table.getCellAreas();
1417
1499
  cellAreas.forEach(function (areaItem) {
1418
1500
  var rows = areaItem.rows;