bk-magic-vue 2.5.9-beta.25 → 2.5.9-beta.26

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.
@@ -40355,14 +40355,25 @@
40355
40355
  rowSelectedChanged: function rowSelectedChanged(states, row, index) {
40356
40356
  var changed = _toggleRowSelection(states, row);
40357
40357
  var selection = states.selection;
40358
+ if (!this.table.shiftMulti.isShift()) {
40359
+ if (selection.includes(row)) {
40360
+ this.table.shiftMulti.setStartStore(row, index);
40361
+ } else {
40362
+ this.table.shiftMulti.setStartStore(null, null);
40363
+ }
40364
+ }
40358
40365
  if (this.table.shiftMulti.setStore(row, index)) {
40359
40366
  var _this$table$shiftMult = this.table.shiftMulti.getStore(),
40360
40367
  start = _this$table$shiftMult.start,
40361
40368
  end = _this$table$shiftMult.end;
40362
40369
  (this.table.data.slice(start.index, end.index + 1) || []).forEach(function (child) {
40363
- if (!states.selection.includes(child)) {
40364
- states.selection.push(child);
40370
+ if (states.selection.includes(child)) {
40371
+ var childIndex = states.selection.findIndex(function (col) {
40372
+ return col === child;
40373
+ });
40374
+ states.selection.splice(childIndex, 1);
40365
40375
  }
40376
+ states.selection.push(child);
40366
40377
  });
40367
40378
  }
40368
40379
  if (changed) {
@@ -42819,6 +42830,12 @@
42819
42830
  clearStore();
42820
42831
  }
42821
42832
  };
42833
+ var setStartStore = function setStartStore(row, index) {
42834
+ store.start = {
42835
+ index: index,
42836
+ row: row
42837
+ };
42838
+ };
42822
42839
  var setStore = function setStore(row, index) {
42823
42840
  if (!isShiftKeyDown) {
42824
42841
  return false;
@@ -42868,6 +42885,7 @@
42868
42885
  };
42869
42886
  return {
42870
42887
  isShiftKeyDown: isShiftKeyDown,
42888
+ setStartStore: setStartStore,
42871
42889
  isShift: isShift,
42872
42890
  onUnmounted: onUnmounted,
42873
42891
  setStore: setStore,