@vxe-ui/plugin-menu 4.3.4 → 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/es/index.js CHANGED
@@ -2,6 +2,15 @@ import XEUtils from 'xe-utils';
2
2
  import { ref, h } from 'vue';
3
3
  let VxeUI;
4
4
  let handleCopy;
5
+ /**
6
+ * 用于开关类型的配置项
7
+ * 局部启用规则:conf={}
8
+ * 局部禁用规则:conf={enabled:false}
9
+ * 全局默认启用规则:conf.enabled=true
10
+ */
11
+ export function hasEnableConf(conf, opts) {
12
+ return opts && (conf ? opts.enabled !== false : opts.enabled);
13
+ }
5
14
  const columnIndexOf = (cols, column) => {
6
15
  return XEUtils.findIndexOf(cols, item => item.id === column.id);
7
16
  };
@@ -77,7 +86,7 @@ function handleCopyOrCut(params, isCut) {
77
86
  const { computeMouseOpts } = $table.getComputeMaps();
78
87
  const mouseOpts = computeMouseOpts.value;
79
88
  let text;
80
- if (mouseConfig && mouseOpts.area) {
89
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
81
90
  if (isCut) {
82
91
  $table.triggerCutCellAreaEvent($event);
83
92
  }
@@ -141,7 +150,7 @@ function getBeenMerges(params) {
141
150
  const mouseOpts = computeMouseOpts.value;
142
151
  const { visibleData } = $table.getTableData();
143
152
  const { visibleColumn } = $table.getTableColumn();
144
- const cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
153
+ const cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
145
154
  const mergeList = $table.getMergeCells();
146
155
  return mergeList.filter(({ row: mergeRowIndex, col: mergeColIndex, rowspan: mergeRowspan, colspan: mergeColspan }) => {
147
156
  return cellAreas.some(areaItem => {
@@ -274,7 +283,7 @@ function checkPrivilege(item, params) {
274
283
  }
275
284
  case 'OPEN_FIND':
276
285
  case 'OPEN_REPLACE': {
277
- item.disabled = !(mouseConfig && mouseOpts.area);
286
+ item.disabled = !(hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area);
278
287
  break;
279
288
  }
280
289
  case 'EDIT_CELL': {
@@ -287,7 +296,7 @@ function checkPrivilege(item, params) {
287
296
  case 'CUT_AREA_CELL':
288
297
  case 'PASTE_CELL':
289
298
  case 'PASTE_AREA_CELL': {
290
- const cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
299
+ const cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
291
300
  item.disabled = cellAreas.length > 1;
292
301
  if (!item.disabled) {
293
302
  switch (code) {
@@ -303,7 +312,7 @@ function checkPrivilege(item, params) {
303
312
  }
304
313
  case 'MERGE_OR_CLEAR':
305
314
  case 'MERGE_CELL': {
306
- const cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
315
+ const cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
307
316
  item.disabled = !cellAreas.length || (cellAreas.length === 1 && cellAreas[0].rows.length === 1 && cellAreas[0].cols.length === 1) || !checkCellOverlay(params, cellAreas);
308
317
  break;
309
318
  }
@@ -435,12 +444,12 @@ export const VxeUIPluginMenu = {
435
444
  const pVersion = 4;
436
445
  const sVersion = 11;
437
446
  if (!VxeUI.checkVersion(VxeUI.tableVersion, pVersion, sVersion)) {
438
- console.error(`[@vxe-ui/plugin-menu 4.3.4] ${VxeUI.getI18n('vxe.error.errorVersion', [`vxe-table@${VxeUI.tableVersion || '?'}`, `vxe-table v${pVersion}.${sVersion}+`])} https://vxeui.com/other4/#/plugin-menu/install`);
447
+ console.error(`[@vxe-ui/plugin-menu 4.4.0] ${VxeUI.getI18n('vxe.error.errorVersion', [`vxe-table@${VxeUI.tableVersion || '?'}`, `vxe-table v${pVersion}.${sVersion}+`])} https://vxeui.com/other4/#/plugin-menu/install`);
439
448
  }
440
449
  }
441
450
  else {
442
451
  if (!/^(4)\./.test(VxeUI.uiVersion || VxeUI.tableVersion)) {
443
- console.error('[@vxe-ui/plugin-menu 4.3.4] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-menu/install');
452
+ console.error('[@vxe-ui/plugin-menu 4.4.0] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-menu/install');
444
453
  }
445
454
  }
446
455
  pluginSetup(options);
@@ -486,7 +495,7 @@ export const VxeUIPluginMenu = {
486
495
  const { mouseConfig } = tableProps;
487
496
  const { computeMouseOpts } = $table.getComputeMaps();
488
497
  const mouseOpts = computeMouseOpts.value;
489
- if (mouseConfig && mouseOpts.area) {
498
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
490
499
  const cellAreas = $table.getCellAreas();
491
500
  if (cellAreas && cellAreas.length) {
492
501
  cellAreas.forEach(areaItem => {
@@ -516,7 +525,7 @@ export const VxeUIPluginMenu = {
516
525
  const { mouseConfig } = tableProps;
517
526
  const { computeMouseOpts } = $table.getComputeMaps();
518
527
  const mouseOpts = computeMouseOpts.value;
519
- if (mouseConfig && mouseOpts.area) {
528
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
520
529
  const cellAreas = $table.getCellAreas();
521
530
  if (cellAreas && cellAreas.length) {
522
531
  cellAreas.forEach(areaItem => {
@@ -562,8 +571,8 @@ export const VxeUIPluginMenu = {
562
571
  const { mouseConfig } = tableProps;
563
572
  const { computeMouseOpts } = $table.getComputeMaps();
564
573
  const mouseOpts = computeMouseOpts.value;
565
- if (mouseConfig && mouseOpts.area) {
566
- const cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
574
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
575
+ const cellAreas = mouseOpts.area ? $table.getCellAreas() : [];
567
576
  cellAreas.forEach(areaItem => {
568
577
  const { rows } = areaItem;
569
578
  $table.clearData(rows);
@@ -595,7 +604,7 @@ export const VxeUIPluginMenu = {
595
604
  const { mouseConfig } = tableProps;
596
605
  const { computeMouseOpts } = $table.getComputeMaps();
597
606
  const mouseOpts = computeMouseOpts.value;
598
- if (mouseConfig && mouseOpts.area) {
607
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
599
608
  const { visibleData } = $table.getTableData();
600
609
  const { visibleColumn } = $table.getTableColumn();
601
610
  $table.setCellAreas([{
@@ -617,7 +626,7 @@ export const VxeUIPluginMenu = {
617
626
  const { mouseConfig } = tableProps;
618
627
  const { computeMouseOpts } = $table.getComputeMaps();
619
628
  const mouseOpts = computeMouseOpts.value;
620
- if (row && column && mouseConfig && mouseOpts.area) {
629
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
621
630
  const { visibleColumn } = $table.getTableColumn();
622
631
  const cellAreas = $table.getCellAreas();
623
632
  if (cellAreas.length === 1) {
@@ -650,7 +659,7 @@ export const VxeUIPluginMenu = {
650
659
  const { mouseConfig } = tableProps;
651
660
  const { computeMouseOpts } = $table.getComputeMaps();
652
661
  const mouseOpts = computeMouseOpts.value;
653
- if (row && column && mouseConfig && mouseOpts.area) {
662
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
654
663
  const { visibleColumn } = $table.getTableColumn();
655
664
  const cellAreas = $table.getCellAreas();
656
665
  if (cellAreas.length === 1) {
@@ -683,7 +692,7 @@ export const VxeUIPluginMenu = {
683
692
  const { mouseConfig } = tableProps;
684
693
  const { computeMouseOpts } = $table.getComputeMaps();
685
694
  const mouseOpts = computeMouseOpts.value;
686
- if (row && column && mouseConfig && mouseOpts.area) {
695
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
687
696
  const { visibleData } = $table.getTableData();
688
697
  const cellAreas = $table.getCellAreas();
689
698
  if (cellAreas.length === 1) {
@@ -716,7 +725,7 @@ export const VxeUIPluginMenu = {
716
725
  const { mouseConfig } = tableProps;
717
726
  const { computeMouseOpts } = $table.getComputeMaps();
718
727
  const mouseOpts = computeMouseOpts.value;
719
- if (row && column && mouseConfig && mouseOpts.area) {
728
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
720
729
  const { visibleData } = $table.getTableData();
721
730
  const cellAreas = $table.getCellAreas();
722
731
  if (cellAreas.length === 1) {
@@ -750,7 +759,7 @@ export const VxeUIPluginMenu = {
750
759
  const { mouseConfig } = tableProps;
751
760
  const { computeMouseOpts } = $table.getComputeMaps();
752
761
  const mouseOpts = computeMouseOpts.value;
753
- if (mouseConfig && mouseOpts.area) {
762
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
754
763
  const cellAreas = $table.getCellAreas();
755
764
  if (cellAreas && cellAreas.length) {
756
765
  cellAreas.forEach(areaItem => {
@@ -858,7 +867,7 @@ export const VxeUIPluginMenu = {
858
867
  const { mouseConfig } = tableProps;
859
868
  const { computeMouseOpts } = $table.getComputeMaps();
860
869
  const mouseOpts = computeMouseOpts.value;
861
- if (mouseConfig && mouseOpts.area) {
870
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
862
871
  $table.triggerPasteCellAreaEvent($event);
863
872
  }
864
873
  else {
@@ -880,7 +889,7 @@ export const VxeUIPluginMenu = {
880
889
  const { mouseConfig } = tableProps;
881
890
  const { computeMouseOpts } = $table.getComputeMaps();
882
891
  const mouseOpts = computeMouseOpts.value;
883
- if (mouseConfig && mouseOpts.area) {
892
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
884
893
  $table.triggerPasteCellAreaEvent($event);
885
894
  }
886
895
  }
@@ -1006,7 +1015,7 @@ export const VxeUIPluginMenu = {
1006
1015
  const { computeMouseOpts } = $table.getComputeMaps();
1007
1016
  const mouseOpts = computeMouseOpts.value;
1008
1017
  $table.insert(menu.params || {}).then(({ rows }) => {
1009
- if (column && mouseConfig && mouseOpts.area) {
1018
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1010
1019
  $table.setCellAreas([
1011
1020
  { startRow: XEUtils.first(rows), endRow: XEUtils.last(rows), startColumn: column, endColumn: column }
1012
1021
  ]);
@@ -1025,7 +1034,7 @@ export const VxeUIPluginMenu = {
1025
1034
  const { computeMouseOpts } = $table.getComputeMaps();
1026
1035
  const mouseOpts = computeMouseOpts.value;
1027
1036
  (row ? $table.insertAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(({ rows }) => {
1028
- if (column && mouseConfig && mouseOpts.area) {
1037
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1029
1038
  $table.setCellAreas([
1030
1039
  { startRow: XEUtils.first(rows), endRow: XEUtils.last(rows), startColumn: column, endColumn: column }
1031
1040
  ]);
@@ -1047,7 +1056,7 @@ export const VxeUIPluginMenu = {
1047
1056
  if (size) {
1048
1057
  const records = XEUtils.range(0, size).map(() => Object.assign({}, menu.params));
1049
1058
  (row ? $table.insertAt(records, row) : $table.insert(records)).then(({ rows }) => {
1050
- if (column && mouseConfig && mouseOpts.area) {
1059
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1051
1060
  $table.setCellAreas([
1052
1061
  { startRow: XEUtils.first(rows), endRow: XEUtils.last(rows), startColumn: column, endColumn: column }
1053
1062
  ]);
@@ -1068,7 +1077,7 @@ export const VxeUIPluginMenu = {
1068
1077
  const { computeMouseOpts } = $table.getComputeMaps();
1069
1078
  const mouseOpts = computeMouseOpts.value;
1070
1079
  (row ? $table.insertNextAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(({ rows }) => {
1071
- if (column && mouseConfig && mouseOpts.area) {
1080
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1072
1081
  $table.setCellAreas([
1073
1082
  { startRow: XEUtils.first(rows), endRow: XEUtils.last(rows), startColumn: column, endColumn: column }
1074
1083
  ]);
@@ -1090,7 +1099,7 @@ export const VxeUIPluginMenu = {
1090
1099
  if (size) {
1091
1100
  const records = XEUtils.range(0, size).map(() => Object.assign({}, menu.params));
1092
1101
  (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(({ rows }) => {
1093
- if (column && mouseConfig && mouseOpts.area) {
1102
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1094
1103
  $table.setCellAreas([
1095
1104
  { startRow: XEUtils.first(rows), endRow: XEUtils.last(rows), startColumn: column, endColumn: column }
1096
1105
  ]);
@@ -1264,7 +1273,7 @@ export const VxeUIPluginMenu = {
1264
1273
  const { mouseConfig } = tableProps;
1265
1274
  const { computeMouseOpts } = $table.getComputeMaps();
1266
1275
  const mouseOpts = computeMouseOpts.value;
1267
- if (mouseConfig && mouseOpts.area) {
1276
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1268
1277
  const cellAreas = $table.getCellAreas();
1269
1278
  cellAreas.forEach(areaItem => {
1270
1279
  const { rows } = areaItem;
@@ -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;
@@ -89,7 +99,7 @@ function handleCopyOrCut(params, isCut) {
89
99
  computeMouseOpts = _$table$getComputeMap.computeMouseOpts;
90
100
  var mouseOpts = computeMouseOpts.value;
91
101
  var text;
92
- if (mouseConfig && mouseOpts.area) {
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,
@@ -320,7 +330,7 @@ function checkPrivilege(item, params) {
320
330
  case 'OPEN_FIND':
321
331
  case 'OPEN_REPLACE':
322
332
  {
323
- item.disabled = !(mouseConfig && mouseOpts.area);
333
+ item.disabled = !(hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area);
324
334
  break;
325
335
  }
326
336
  case 'EDIT_CELL':
@@ -335,7 +345,7 @@ function checkPrivilege(item, params) {
335
345
  case 'PASTE_CELL':
336
346
  case 'PASTE_AREA_CELL':
337
347
  {
338
- var cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
348
+ var cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
339
349
  item.disabled = cellAreas.length > 1;
340
350
  if (!item.disabled) {
341
351
  switch (code) {
@@ -353,7 +363,7 @@ function checkPrivilege(item, params) {
353
363
  case 'MERGE_OR_CLEAR':
354
364
  case 'MERGE_CELL':
355
365
  {
356
- var _cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
366
+ var _cellAreas = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? $table.getCellAreas() : [];
357
367
  item.disabled = !_cellAreas.length || _cellAreas.length === 1 && _cellAreas[0].rows.length === 1 && _cellAreas[0].cols.length === 1 || !checkCellOverlay(params, _cellAreas);
358
368
  break;
359
369
  }
@@ -483,11 +493,11 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
483
493
  var pVersion = 4;
484
494
  var sVersion = 11;
485
495
  if (!VxeUI.checkVersion(VxeUI.tableVersion, pVersion, sVersion)) {
486
- console.error("[@vxe-ui/plugin-menu 4.3.4] ".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"));
487
497
  }
488
498
  } else {
489
499
  if (!/^(4)\./.test(VxeUI.uiVersion || VxeUI.tableVersion)) {
490
- console.error('[@vxe-ui/plugin-menu 4.3.4] 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');
491
501
  }
492
502
  }
493
503
  pluginSetup(options);
@@ -536,7 +546,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
536
546
  var _$table$getComputeMap4 = $table.getComputeMaps(),
537
547
  computeMouseOpts = _$table$getComputeMap4.computeMouseOpts;
538
548
  var mouseOpts = computeMouseOpts.value;
539
- if (mouseConfig && mouseOpts.area) {
549
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
540
550
  var cellAreas = $table.getCellAreas();
541
551
  if (cellAreas && cellAreas.length) {
542
552
  cellAreas.forEach(function (areaItem) {
@@ -569,7 +579,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
569
579
  var _$table$getComputeMap5 = $table.getComputeMaps(),
570
580
  computeMouseOpts = _$table$getComputeMap5.computeMouseOpts;
571
581
  var mouseOpts = computeMouseOpts.value;
572
- if (mouseConfig && mouseOpts.area) {
582
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
573
583
  var cellAreas = $table.getCellAreas();
574
584
  if (cellAreas && cellAreas.length) {
575
585
  cellAreas.forEach(function (areaItem) {
@@ -620,8 +630,8 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
620
630
  var _$table$getComputeMap6 = $table.getComputeMaps(),
621
631
  computeMouseOpts = _$table$getComputeMap6.computeMouseOpts;
622
632
  var mouseOpts = computeMouseOpts.value;
623
- if (mouseConfig && mouseOpts.area) {
624
- var cellAreas = mouseConfig && mouseOpts.area ? $table.getCellAreas() : [];
633
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
634
+ var cellAreas = mouseOpts.area ? $table.getCellAreas() : [];
625
635
  cellAreas.forEach(function (areaItem) {
626
636
  var rows = areaItem.rows;
627
637
  $table.clearData(rows);
@@ -653,7 +663,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
653
663
  var _$table$getComputeMap7 = $table.getComputeMaps(),
654
664
  computeMouseOpts = _$table$getComputeMap7.computeMouseOpts;
655
665
  var mouseOpts = computeMouseOpts.value;
656
- if (mouseConfig && mouseOpts.area) {
666
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
657
667
  var _$table$getTableData4 = $table.getTableData(),
658
668
  visibleData = _$table$getTableData4.visibleData;
659
669
  var _$table$getTableColum4 = $table.getTableColumn(),
@@ -680,7 +690,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
680
690
  var _$table$getComputeMap8 = $table.getComputeMaps(),
681
691
  computeMouseOpts = _$table$getComputeMap8.computeMouseOpts;
682
692
  var mouseOpts = computeMouseOpts.value;
683
- if (row && column && mouseConfig && mouseOpts.area) {
693
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
684
694
  var _$table$getTableColum5 = $table.getTableColumn(),
685
695
  visibleColumn = _$table$getTableColum5.visibleColumn;
686
696
  var cellAreas = $table.getCellAreas();
@@ -722,7 +732,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
722
732
  var _$table$getComputeMap9 = $table.getComputeMaps(),
723
733
  computeMouseOpts = _$table$getComputeMap9.computeMouseOpts;
724
734
  var mouseOpts = computeMouseOpts.value;
725
- if (row && column && mouseConfig && mouseOpts.area) {
735
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
726
736
  var _$table$getTableColum6 = $table.getTableColumn(),
727
737
  visibleColumn = _$table$getTableColum6.visibleColumn;
728
738
  var cellAreas = $table.getCellAreas();
@@ -764,7 +774,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
764
774
  var _$table$getComputeMap0 = $table.getComputeMaps(),
765
775
  computeMouseOpts = _$table$getComputeMap0.computeMouseOpts;
766
776
  var mouseOpts = computeMouseOpts.value;
767
- if (row && column && mouseConfig && mouseOpts.area) {
777
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
768
778
  var _$table$getTableData5 = $table.getTableData(),
769
779
  visibleData = _$table$getTableData5.visibleData;
770
780
  var cellAreas = $table.getCellAreas();
@@ -806,7 +816,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
806
816
  var _$table$getComputeMap1 = $table.getComputeMaps(),
807
817
  computeMouseOpts = _$table$getComputeMap1.computeMouseOpts;
808
818
  var mouseOpts = computeMouseOpts.value;
809
- if (row && column && mouseConfig && mouseOpts.area) {
819
+ if (row && column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
810
820
  var _$table$getTableData6 = $table.getTableData(),
811
821
  visibleData = _$table$getTableData6.visibleData;
812
822
  var cellAreas = $table.getCellAreas();
@@ -849,7 +859,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
849
859
  var _$table$getComputeMap10 = $table.getComputeMaps(),
850
860
  computeMouseOpts = _$table$getComputeMap10.computeMouseOpts;
851
861
  var mouseOpts = computeMouseOpts.value;
852
- if (mouseConfig && mouseOpts.area) {
862
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
853
863
  var cellAreas = $table.getCellAreas();
854
864
  if (cellAreas && cellAreas.length) {
855
865
  cellAreas.forEach(function (areaItem) {
@@ -961,7 +971,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
961
971
  var _$table$getComputeMap11 = $table.getComputeMaps(),
962
972
  computeMouseOpts = _$table$getComputeMap11.computeMouseOpts;
963
973
  var mouseOpts = computeMouseOpts.value;
964
- if (mouseConfig && mouseOpts.area) {
974
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
965
975
  $table.triggerPasteCellAreaEvent($event);
966
976
  } else {
967
977
  var clipboard = getClipboardObj();
@@ -984,7 +994,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
984
994
  var _$table$getComputeMap12 = $table.getComputeMaps(),
985
995
  computeMouseOpts = _$table$getComputeMap12.computeMouseOpts;
986
996
  var mouseOpts = computeMouseOpts.value;
987
- if (mouseConfig && mouseOpts.area) {
997
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
988
998
  $table.triggerPasteCellAreaEvent($event);
989
999
  }
990
1000
  }
@@ -1157,7 +1167,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1157
1167
  var mouseOpts = computeMouseOpts.value;
1158
1168
  $table.insert(menu.params || {}).then(function (_ref7) {
1159
1169
  var rows = _ref7.rows;
1160
- if (column && mouseConfig && mouseOpts.area) {
1170
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1161
1171
  $table.setCellAreas([{
1162
1172
  startRow: _xeUtils["default"].first(rows),
1163
1173
  endRow: _xeUtils["default"].last(rows),
@@ -1184,7 +1194,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1184
1194
  var mouseOpts = computeMouseOpts.value;
1185
1195
  (row ? $table.insertAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref8) {
1186
1196
  var rows = _ref8.rows;
1187
- if (column && mouseConfig && mouseOpts.area) {
1197
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1188
1198
  $table.setCellAreas([{
1189
1199
  startRow: _xeUtils["default"].first(rows),
1190
1200
  endRow: _xeUtils["default"].last(rows),
@@ -1217,7 +1227,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1217
1227
  });
1218
1228
  (row ? $table.insertAt(records, row) : $table.insert(records)).then(function (_ref0) {
1219
1229
  var rows = _ref0.rows;
1220
- if (column && mouseConfig && mouseOpts.area) {
1230
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1221
1231
  $table.setCellAreas([{
1222
1232
  startRow: _xeUtils["default"].first(rows),
1223
1233
  endRow: _xeUtils["default"].last(rows),
@@ -1246,7 +1256,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1246
1256
  var mouseOpts = computeMouseOpts.value;
1247
1257
  (row ? $table.insertNextAt(menu.params || {}, row) : $table.insert(menu.params || {})).then(function (_ref1) {
1248
1258
  var rows = _ref1.rows;
1249
- if (column && mouseConfig && mouseOpts.area) {
1259
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1250
1260
  $table.setCellAreas([{
1251
1261
  startRow: _xeUtils["default"].first(rows),
1252
1262
  endRow: _xeUtils["default"].last(rows),
@@ -1279,7 +1289,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1279
1289
  });
1280
1290
  (row ? $table.insertNextAt(records, row) : $table.insert(records)).then(function (_ref11) {
1281
1291
  var rows = _ref11.rows;
1282
- if (column && mouseConfig && mouseOpts.area) {
1292
+ if (column && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1283
1293
  $table.setCellAreas([{
1284
1294
  startRow: _xeUtils["default"].first(rows),
1285
1295
  endRow: _xeUtils["default"].last(rows),
@@ -1484,7 +1494,7 @@ var VxeUIPluginMenu = exports.VxeUIPluginMenu = {
1484
1494
  var _$table$getComputeMap18 = $table.getComputeMaps(),
1485
1495
  computeMouseOpts = _$table$getComputeMap18.computeMouseOpts;
1486
1496
  var mouseOpts = computeMouseOpts.value;
1487
- if (mouseConfig && mouseOpts.area) {
1497
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
1488
1498
  var cellAreas = $table.getCellAreas();
1489
1499
  cellAreas.forEach(function (areaItem) {
1490
1500
  var rows = areaItem.rows;