@opentinyvue/vue-grid 3.28.0 → 3.29.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
@@ -257,6 +257,8 @@ var GlobalConfig$1 = {
257
257
  defaultTreeSpacing: 30,
258
258
  rowId: "_RID",
259
259
  // 行数据的唯一主键字段名
260
+ $rowIndex: Symbol("$rowIndex"),
261
+ // 虚拟滚动处理后的行索引
260
262
  version: 0,
261
263
  // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
262
264
  optimization: {
@@ -2275,9 +2277,9 @@ var useCellSpan = function useCellSpan2(bodyVm, bodyProps) {
2275
2277
  var leftList = columnStore.leftList, rightList = columnStore.rightList;
2276
2278
  var normalState = {};
2277
2279
  var normalTable = [];
2278
- for (var $rowIndex = 0; $rowIndex < tableData.length; $rowIndex++) {
2279
- var row2 = tableData[$rowIndex];
2280
- var rowLevel = tableNode[$rowIndex].level;
2280
+ for (var _index4 = 0; _index4 < tableData.length; _index4++) {
2281
+ var row2 = tableData[_index4];
2282
+ var rowLevel = tableNode[_index4].level;
2281
2283
  var rowIndex = $table.getRowIndex(row2);
2282
2284
  var virtualRow = false;
2283
2285
  if (hasVirtualRow) {
@@ -2287,7 +2289,7 @@ var useCellSpan = function useCellSpan2(bodyVm, bodyProps) {
2287
2289
  if (!isSkipRowRender) {
2288
2290
  seqCount.value = seqCount.value + 1;
2289
2291
  }
2290
- var seq = isOrdered ? seqCount.value : $rowIndex + 1;
2292
+ var seq = isOrdered ? seqCount.value : _index4 + 1;
2291
2293
  if (scrollYLoad) {
2292
2294
  seq += startIndex;
2293
2295
  }
@@ -2302,7 +2304,7 @@ var useCellSpan = function useCellSpan2(bodyVm, bodyProps) {
2302
2304
  $table,
2303
2305
  data: tableData,
2304
2306
  row: row2,
2305
- $rowIndex,
2307
+ $rowIndex: row2[GlobalConfig$1.$rowIndex],
2306
2308
  rowIndex,
2307
2309
  level: rowLevel,
2308
2310
  $seq: "",
@@ -2746,9 +2748,11 @@ var updatePool = function updatePool2(array, context) {
2746
2748
  var indices = /* @__PURE__ */ new WeakMap();
2747
2749
  expires.forEach(function(item) {
2748
2750
  var view = context.idViewMap.get(item.id);
2749
- view.used = false;
2750
- context.idViewMap.delete(item.id);
2751
- context.unusedViews.push(view);
2751
+ if (view) {
2752
+ view.used = false;
2753
+ context.idViewMap.delete(item.id);
2754
+ context.unusedViews.push(view);
2755
+ }
2752
2756
  });
2753
2757
  array.forEach(function(item, i) {
2754
2758
  indices.set(item, i);
@@ -2775,6 +2779,34 @@ var updatePool = function updatePool2(array, context) {
2775
2779
  });
2776
2780
  return context;
2777
2781
  };
2782
+ function addTableDataRowIndex(rowPool) {
2783
+ var treeTableData = [];
2784
+ var $rowIndex = GlobalConfig$1.$rowIndex;
2785
+ var tempChildren = Symbol("tempChildren");
2786
+ rowPool.forEach(function(rowPoolItem) {
2787
+ var _rowPoolItem$item = rowPoolItem.item, row2 = _rowPoolItem$item.payload, level = _rowPoolItem$item.level, parentNode = _rowPoolItem$item.parentNode, used = rowPoolItem.used;
2788
+ if (!used) {
2789
+ return;
2790
+ }
2791
+ if (level === 0) {
2792
+ treeTableData.push(row2);
2793
+ row2[$rowIndex] = treeTableData.length - 1;
2794
+ return;
2795
+ }
2796
+ var parent = parentNode == null ? void 0 : parentNode.payload;
2797
+ if (!parent) {
2798
+ return;
2799
+ }
2800
+ if (!parent[tempChildren]) {
2801
+ parent[tempChildren] = [];
2802
+ }
2803
+ parent[tempChildren].push(row2);
2804
+ row2[$rowIndex] = parent[tempChildren].length - 1;
2805
+ });
2806
+ rowPool.forEach(function(rowPoolItem) {
2807
+ delete rowPoolItem.item.payload[tempChildren];
2808
+ });
2809
+ }
2778
2810
  var usePool = function usePool2(props) {
2779
2811
  var columnPool = hooks.ref([]);
2780
2812
  var rowPool = hooks.ref([]);
@@ -2801,6 +2833,7 @@ var usePool = function usePool2(props) {
2801
2833
  rowContext = createPool(props.tableNode);
2802
2834
  }
2803
2835
  rowPool.value = ((_rowContext = rowContext) == null ? void 0 : _rowContext.pool) || rowPool.value;
2836
+ addTableDataRowIndex(rowPool.value);
2804
2837
  isNoData.value = !(((_props$tableNode = props.tableNode) == null ? void 0 : _props$tableNode.length) > 0);
2805
2838
  });
2806
2839
  return {
@@ -3047,13 +3080,14 @@ function renderRows(_vm) {
3047
3080
  value: 0
3048
3081
  };
3049
3082
  var $seq = "";
3050
- rowPool.forEach(function(_ref49, $rowIndex) {
3083
+ rowPool.forEach(function(_ref49) {
3051
3084
  var id3 = _ref49.id, _ref49$item = _ref49.item, row2 = _ref49$item.payload, rowLevel = _ref49$item.level, used = _ref49.used;
3052
3085
  var rowActived = editConfig && actived.row === row2;
3053
3086
  var virtualRow = isVirtualRow(row2);
3054
3087
  var isSkipRowRender = hideMethod && hideMethod(row2, rowLevel) || virtualRow;
3055
3088
  var rowid2 = getRowid($table, row2);
3056
3089
  var rowIndex = $table.getRowIndex(row2);
3090
+ var $rowIndex = row2[GlobalConfig$1.$rowIndex];
3057
3091
  if (!isSkipRowRender) {
3058
3092
  seqCount.value = seqCount.value + 1;
3059
3093
  }
@@ -3096,7 +3130,8 @@ function renderRows(_vm) {
3096
3130
  seq,
3097
3131
  treeConfig,
3098
3132
  used,
3099
- selectRow
3133
+ selectRow,
3134
+ scrollYLoad
3100
3135
  });
3101
3136
  renderRow(args);
3102
3137
  renderRowAfter({
@@ -3180,9 +3215,8 @@ function renderRowAfter(_ref50) {
3180
3215
  }, h);
3181
3216
  }
3182
3217
  function renderRow(args) {
3183
- var _ref51;
3184
3218
  var $rowIndex = args.$rowIndex, $seq = args.$seq, $table = args.$table, _vm = args._vm, editStore = args.editStore, id3 = args.id, isSkipRowRender = args.isSkipRowRender, row2 = args.row, rowActived = args.rowActived, rowClassName = args.rowClassName;
3185
- var rowIndex = args.rowIndex, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows, selection = args.selection, selectRow = args.selectRow, seq = args.seq, treeConfig = args.treeConfig, used = args.used;
3219
+ var rowIndex = args.rowIndex, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows, selection = args.selection, selectRow = args.selectRow, seq = args.seq, treeConfig = args.treeConfig, used = args.used, scrollYLoad = args.scrollYLoad;
3186
3220
  if (isSkipRowRender) {
3187
3221
  return;
3188
3222
  }
@@ -3196,38 +3230,41 @@ function renderRow(args) {
3196
3230
  }
3197
3231
  }
3198
3232
  var columnPool = _vm.columnPool;
3199
- rows.push(createVNode("tr", {
3200
- "key": key,
3201
- "data-rowid": rowid2,
3202
- "data-rowindex": $rowIndex,
3203
- "data-rowlevel": rowLevel,
3204
- "style": {
3205
- display: used ? void 0 : "none"
3206
- },
3207
- "class": ["tiny-grid-body__row", (_ref51 = {}, _ref51["row__level-" + rowLevel] = treeConfig, _ref51["row__new"] = editStore.insertList.includes(row2), _ref51["row__selected"] = selection.includes(row2), _ref51["row__radio"] = selectRow === row2, _ref51["row__actived"] = rowActived, _ref51), rowClassName ? isFunction(rowClassName) ? rowClassName({
3208
- $table,
3209
- $seq,
3210
- seq,
3211
- fixedType: void 0,
3212
- rowLevel,
3213
- row: row2,
3214
- rowIndex,
3215
- $rowIndex
3216
- }) : rowClassName : ""]
3217
- }, [columnPool.map(function(_ref52, $columnIndex) {
3218
- var id4 = _ref52.id, column = _ref52.item, used2 = _ref52.used;
3219
- return renderColumn({
3220
- $columnIndex,
3221
- $table,
3222
- _vm,
3223
- column,
3224
- id: id4,
3225
- row: row2,
3226
- rowid: rowid2,
3227
- seq,
3228
- used: used2
3229
- });
3230
- })]));
3233
+ if (used || scrollYLoad) {
3234
+ var _ref51;
3235
+ rows.push(createVNode("tr", {
3236
+ "key": key,
3237
+ "data-rowid": rowid2,
3238
+ "data-rowindex": $rowIndex,
3239
+ "data-rowlevel": rowLevel,
3240
+ "style": {
3241
+ display: used ? void 0 : "none"
3242
+ },
3243
+ "class": ["tiny-grid-body__row", (_ref51 = {}, _ref51["row__level-" + rowLevel] = treeConfig, _ref51["row__new"] = editStore.insertList.includes(row2), _ref51["row__selected"] = selection.includes(row2), _ref51["row__radio"] = selectRow === row2, _ref51["row__actived"] = rowActived, _ref51), rowClassName ? isFunction(rowClassName) ? rowClassName({
3244
+ $table,
3245
+ $seq,
3246
+ seq,
3247
+ fixedType: void 0,
3248
+ rowLevel,
3249
+ row: row2,
3250
+ rowIndex,
3251
+ $rowIndex
3252
+ }) : rowClassName : ""]
3253
+ }, [columnPool.map(function(_ref52, $columnIndex) {
3254
+ var id4 = _ref52.id, column = _ref52.item, used2 = _ref52.used;
3255
+ return renderColumn({
3256
+ $columnIndex,
3257
+ $table,
3258
+ _vm,
3259
+ column,
3260
+ id: id4,
3261
+ row: row2,
3262
+ rowid: rowid2,
3263
+ seq,
3264
+ used: used2
3265
+ });
3266
+ })]));
3267
+ }
3231
3268
  }
3232
3269
  function renderRowGroupTds(_ref53) {
3233
3270
  var $table = _ref53.$table, closeable = _ref53.closeable, render17 = _ref53.render, renderGroupCell = _ref53.renderGroupCell, row2 = _ref53.row, tds = _ref53.tds, title = _ref53.title, _vm = _ref53._vm;
@@ -4063,14 +4100,15 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4063
4100
  }
4064
4101
  if (this.visible) {
4065
4102
  setTimeout(function() {
4103
+ var _this4$$grid;
4066
4104
  var _this4$filterStore = _this4.filterStore, targetElemParentTr = _this4$filterStore.targetElemParentTr, id3 = _this4$filterStore.id;
4067
4105
  var reference = targetElemParentTr && targetElemParentTr.querySelector("svg.tiny-grid-filter__btn." + id3);
4068
4106
  var popper = _this4.$el;
4069
4107
  popper.style.zIndex = PopupManager.nextZIndex();
4070
- _this4.popperJS = new PopperJS(reference, popper, {
4108
+ _this4.popperJS = new PopperJS(reference, popper, _extends({
4071
4109
  placement: "bottom-end",
4072
4110
  gpuAcceleration: false
4073
- });
4111
+ }, ((_this4$$grid = _this4.$grid) == null ? void 0 : _this4$$grid.filterPopperOptions) || {}));
4074
4112
  popper.style.display = "block";
4075
4113
  });
4076
4114
  }
@@ -4184,7 +4222,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4184
4222
  };
4185
4223
  }
4186
4224
  }, _isSlot(label) ? label : {
4187
- default: function _default28() {
4225
+ default: function _default29() {
4188
4226
  return [label];
4189
4227
  }
4190
4228
  });
@@ -4196,19 +4234,19 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4196
4234
  "type": "primary",
4197
4235
  "onClick": this.filterInput
4198
4236
  }, _isSlot(_slot = this.i18n("ui.base.confirm")) ? _slot : {
4199
- default: function _default28() {
4237
+ default: function _default29() {
4200
4238
  return [_slot];
4201
4239
  }
4202
4240
  }), createVNode(Button, {
4203
4241
  "onClick": this.resetInput
4204
4242
  }, _isSlot(_slot2 = this.i18n("ui.base.reset")) ? _slot2 : {
4205
- default: function _default28() {
4243
+ default: function _default29() {
4206
4244
  return [_slot2];
4207
4245
  }
4208
4246
  }), createVNode(Button, {
4209
4247
  "onClick": this.close
4210
4248
  }, _isSlot(_slot3 = this.i18n("ui.base.cancel")) ? _slot3 : {
4211
- default: function _default28() {
4249
+ default: function _default29() {
4212
4250
  return [_slot3];
4213
4251
  }
4214
4252
  })])]);
@@ -4232,7 +4270,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4232
4270
  "type": "primary",
4233
4271
  "onClick": this.filterEnum
4234
4272
  }, _isSlot(_slot4 = this.i18n("ui.base.confirm")) ? _slot4 : {
4235
- default: function _default28() {
4273
+ default: function _default29() {
4236
4274
  return [_slot4];
4237
4275
  }
4238
4276
  }), createVNode(Button, {
@@ -4240,7 +4278,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4240
4278
  filterStore.visible = false;
4241
4279
  }
4242
4280
  }, _isSlot(_slot5 = this.i18n("ui.base.cancel")) ? _slot5 : {
4243
- default: function _default28() {
4281
+ default: function _default29() {
4244
4282
  return [_slot5];
4245
4283
  }
4246
4284
  })]) : null]);
@@ -4312,7 +4350,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4312
4350
  "type": "primary",
4313
4351
  "onClick": this.filterDate
4314
4352
  }, _isSlot(_slot6 = this.i18n("ui.base.confirm")) ? _slot6 : {
4315
- default: function _default28() {
4353
+ default: function _default29() {
4316
4354
  return [_slot6];
4317
4355
  }
4318
4356
  }), createVNode(Button, {
@@ -4320,7 +4358,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4320
4358
  filterStore.visible = false;
4321
4359
  }
4322
4360
  }, _isSlot(_slot7 = this.i18n("ui.base.cancel")) ? _slot7 : {
4323
- default: function _default28() {
4361
+ default: function _default29() {
4324
4362
  return [_slot7];
4325
4363
  }
4326
4364
  })])]);
@@ -4361,7 +4399,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4361
4399
  "type": "primary",
4362
4400
  "onClick": this.filterEnum
4363
4401
  }, _isSlot(_slot8 = this.i18n("ui.base.confirm")) ? _slot8 : {
4364
- default: function _default28() {
4402
+ default: function _default29() {
4365
4403
  return [_slot8];
4366
4404
  }
4367
4405
  }), createVNode(Button, {
@@ -4369,7 +4407,7 @@ var Panel$1 = /* @__PURE__ */ defineComponent({
4369
4407
  filterStore.visible = false;
4370
4408
  }
4371
4409
  }, _isSlot(_slot9 = this.i18n("ui.base.cancel")) ? _slot9 : {
4372
- default: function _default28() {
4410
+ default: function _default29() {
4373
4411
  return [_slot9];
4374
4412
  }
4375
4413
  })]) : null]);
@@ -5628,11 +5666,11 @@ function getColumnRuleTypeOther(_ref94) {
5628
5666
  var $table = _ref94.$table, _vm = _ref94._vm, colProps = _ref94.colProps, editor = _ref94.editor, filter2 = _ref94.filter, isTreeNode = _ref94.isTreeNode, renMaps = _ref94.renMaps, type = _ref94.type;
5629
5667
  return {
5630
5668
  match: function match() {
5631
- return !~["index", "radio", "selection", "expand", "operation"].indexOf(type);
5669
+ return !["index", "radio", "selection", "expand", "operation"].includes(type);
5632
5670
  },
5633
5671
  action: function action() {
5634
5672
  var sortable = colProps.sortable, remoteSort = colProps.remoteSort;
5635
- var isSortable = $table.sortable && (type ? false : sortable);
5673
+ var isSortable = $table.sortable && sortable;
5636
5674
  var isSortColumn = isSortable || remoteSort;
5637
5675
  if (editor) {
5638
5676
  renMaps.renderHeader = _vm.renderEditHeader;
@@ -5759,6 +5797,7 @@ var Cell = {
5759
5797
  var $table = params.$table, row2 = params.row, column = params.column;
5760
5798
  var slots = column.slots, renderer = column.renderer;
5761
5799
  var format = column.format || {};
5800
+ $table.columnSlotsWeakMap || ($table.columnSlotsWeakMap = /* @__PURE__ */ new WeakMap());
5762
5801
  if (slots && slots.default) {
5763
5802
  return slots.default(params, h2);
5764
5803
  }
@@ -6360,7 +6399,7 @@ var Cell = {
6360
6399
  return renderBig(buttonConfig, viewClass);
6361
6400
  });
6362
6401
  var scopedSlots = {
6363
- default: function _default28() {
6402
+ default: function _default29() {
6364
6403
  return h2(iconEllipsis(), {
6365
6404
  class: "tiny-grid__oper-col-elps"
6366
6405
  });
@@ -8891,7 +8930,7 @@ var Methods$d = {
8891
8930
  // 点击排序事件
8892
8931
  triggerSortEvent: function triggerSortEvent(event, column, order) {
8893
8932
  var property = column.property;
8894
- var isColumnSortable = column.type ? false : column.sortable || column.remoteSort;
8933
+ var isColumnSortable = column.sortable || column.remoteSort;
8895
8934
  if (this.sortable && isColumnSortable) {
8896
8935
  var evntParams = {
8897
8936
  $table: this,
@@ -8916,7 +8955,7 @@ var Methods$d = {
8916
8955
  return item.property === field;
8917
8956
  });
8918
8957
  var isRemote = isBoolean(column.remoteSort) ? column.remoteSort : remoteSort;
8919
- var isColumnSortable = column.type ? false : column.sortable || column.remoteSort;
8958
+ var isColumnSortable = column.sortable || column.remoteSort;
8920
8959
  if (this.sortable && isColumnSortable) {
8921
8960
  if (column.order !== order) {
8922
8961
  tableFullColumn.forEach(function(column2) {
@@ -9840,7 +9879,7 @@ var _sfc_main$7 = defineComponent({
9840
9879
  })]);
9841
9880
  } else {
9842
9881
  var scopedSlots = {
9843
- default: function _default28() {
9882
+ default: function _default29() {
9844
9883
  return h(IconEllipsis(), {
9845
9884
  class: "mf-table-more outline-none text-base cursor-pointer"
9846
9885
  });
@@ -11442,6 +11481,7 @@ var Table = defineComponent({
11442
11481
  var tableListeners = getListeners(attrs, listeners);
11443
11482
  var markColumnIndex = hooks.ref(0);
11444
11483
  var rowidCacheMap = /* @__PURE__ */ new Map();
11484
+ var columnSlotsWeakMap = /* @__PURE__ */ new WeakMap();
11445
11485
  return {
11446
11486
  slots,
11447
11487
  tableListeners,
@@ -11480,7 +11520,8 @@ var Table = defineComponent({
11480
11520
  markColumnIndex,
11481
11521
  rowidCacheMap,
11482
11522
  horizonScroll,
11483
- resolveMap
11523
+ resolveMap,
11524
+ columnSlotsWeakMap
11484
11525
  };
11485
11526
  },
11486
11527
  render: function render14() {
@@ -11862,7 +11903,13 @@ var Grid = defineComponent({
11862
11903
  default: false
11863
11904
  },
11864
11905
  isMultipleHistory: Boolean,
11865
- selectToolbar: [Boolean, Object]
11906
+ selectToolbar: [Boolean, Object],
11907
+ filterPopperOptions: {
11908
+ type: Object,
11909
+ default: function _default28() {
11910
+ return {};
11911
+ }
11912
+ }
11866
11913
  }),
11867
11914
  data: function data6() {
11868
11915
  return {
@@ -12287,8 +12334,10 @@ var Methods$c = {
12287
12334
  var _column$format, _column$format$async;
12288
12335
  return (_column$format = column.format) == null ? void 0 : (_column$format$async = _column$format.async) == null ? void 0 : _column$format$async.fetch;
12289
12336
  });
12337
+ var defaultRowId = "_RID";
12290
12338
  var newRecords = records.map(function(record) {
12291
12339
  isColumnFormat && (record[GlobalConfig$1.constant.insertedField] = true);
12340
+ delete record[defaultRowId];
12292
12341
  return hooks.reactive(_this53.defineField(Object.assign({}, record)));
12293
12342
  });
12294
12343
  operArrs({
@@ -12483,7 +12532,7 @@ var Methods$c = {
12483
12532
  editConfig,
12484
12533
  row: row2
12485
12534
  });
12486
- if (!(editor && cell && isActiveCell)) {
12535
+ if (!(editor && cell && isActiveCell && editConfig)) {
12487
12536
  _context.n = 2;
12488
12537
  break;
12489
12538
  }
@@ -12755,10 +12804,10 @@ function findLeft(params) {
12755
12804
  targetRowIndex
12756
12805
  };
12757
12806
  }
12758
- for (var _index4 = columnIndex - 1; _index4 >= 0; _index4--) {
12759
- if (checkColumn(visibleColumn[_index4])) {
12760
- targetColumnIndex = _index4;
12761
- targetColumn = visibleColumn[_index4];
12807
+ for (var _index5 = columnIndex - 1; _index5 >= 0; _index5--) {
12808
+ if (checkColumn(visibleColumn[_index5])) {
12809
+ targetColumnIndex = _index5;
12810
+ targetColumn = visibleColumn[_index5];
12762
12811
  break;
12763
12812
  }
12764
12813
  }
@@ -12772,10 +12821,10 @@ function findLeft(params) {
12772
12821
  }
12773
12822
  targetRowIndex = rowIndex - 1;
12774
12823
  targetRow = tableData[targetRowIndex];
12775
- for (var _index5 = visibleColumn.length - 1; _index5 >= 0; _index5--) {
12776
- if (checkColumn(visibleColumn[_index5])) {
12777
- targetColumnIndex = _index5;
12778
- targetColumn = visibleColumn[_index5];
12824
+ for (var _index6 = visibleColumn.length - 1; _index6 >= 0; _index6--) {
12825
+ if (checkColumn(visibleColumn[_index6])) {
12826
+ targetColumnIndex = _index6;
12827
+ targetColumn = visibleColumn[_index6];
12779
12828
  break;
12780
12829
  }
12781
12830
  }
@@ -12797,10 +12846,10 @@ function findRight(params) {
12797
12846
  targetRowIndex
12798
12847
  };
12799
12848
  }
12800
- for (var _index6 = columnIndex + 1; _index6 < visibleColumn.length; _index6++) {
12801
- if (checkColumn(visibleColumn[_index6])) {
12802
- targetColumnIndex = _index6;
12803
- targetColumn = visibleColumn[_index6];
12849
+ for (var _index7 = columnIndex + 1; _index7 < visibleColumn.length; _index7++) {
12850
+ if (checkColumn(visibleColumn[_index7])) {
12851
+ targetColumnIndex = _index7;
12852
+ targetColumn = visibleColumn[_index7];
12804
12853
  break;
12805
12854
  }
12806
12855
  }
@@ -12814,10 +12863,10 @@ function findRight(params) {
12814
12863
  }
12815
12864
  targetRowIndex = rowIndex + 1;
12816
12865
  targetRow = tableData[targetRowIndex];
12817
- for (var _index7 = 0; _index7 < visibleColumn.length; _index7++) {
12818
- if (checkColumn(visibleColumn[_index7])) {
12819
- targetColumnIndex = _index7;
12820
- targetColumn = visibleColumn[_index7];
12866
+ for (var _index8 = 0; _index8 < visibleColumn.length; _index8++) {
12867
+ if (checkColumn(visibleColumn[_index8])) {
12868
+ targetColumnIndex = _index8;
12869
+ targetColumn = visibleColumn[_index8];
12821
12870
  break;
12822
12871
  }
12823
12872
  }
@@ -15913,7 +15962,7 @@ var Methods = {
15913
15962
  var treeExpandedsCopy = [].concat(treeExpandeds);
15914
15963
  rows.forEach(function(row2) {
15915
15964
  if (row2[children] && row2[children].length) {
15916
- var _index8 = treeExpandedsCopy.indexOf(row2);
15965
+ var _index9 = treeExpandedsCopy.indexOf(row2);
15917
15966
  if (accordion) {
15918
15967
  var matchObj = findTree$1(tableFullData, function(item) {
15919
15968
  return item === row2;
@@ -15922,11 +15971,11 @@ var Methods = {
15922
15971
  return ~matchObj.items.indexOf(item);
15923
15972
  });
15924
15973
  }
15925
- if (~_index8 && (isToggle || !expanded)) {
15926
- treeExpandedsCopy.splice(_index8, 1);
15974
+ if (~_index9 && (isToggle || !expanded)) {
15975
+ treeExpandedsCopy.splice(_index9, 1);
15927
15976
  return;
15928
15977
  }
15929
- if (!~_index8 && (isToggle || expanded)) {
15978
+ if (!~_index9 && (isToggle || expanded)) {
15930
15979
  treeExpandedsCopy.push(row2);
15931
15980
  }
15932
15981
  }
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-grid",
3
3
  "type": "module",
4
- "version": "3.28.0",
4
+ "version": "3.29.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/utils": "~3.28.0",
12
- "@opentinyvue/vue-common": "~3.28.0",
13
- "@opentinyvue/vue-directive": "~3.28.0",
14
- "@opentinyvue/vue-dropdown": "~3.28.0",
15
- "@opentinyvue/vue-dropdown-item": "~3.28.0",
16
- "@opentinyvue/vue-dropdown-menu": "~3.28.0",
17
- "@opentinyvue/vue-exception": "~3.28.0",
18
- "@opentinyvue/vue-icon": "~3.28.0",
19
- "@opentinyvue/vue-loading": "~3.28.0",
20
- "@opentinyvue/vue-locale": "~3.28.0",
21
- "@opentinyvue/vue-modal": "~3.28.0",
22
- "@opentinyvue/vue-pager": "~3.28.0",
23
- "@opentinyvue/vue-renderless": "~3.28.0",
24
- "@opentinyvue/vue-tag": "~3.28.0",
25
- "@opentinyvue/vue-theme": "~3.28.0",
26
- "@opentinyvue/vue-tooltip": "~3.28.0"
11
+ "@opentinyvue/utils": "~3.29.0",
12
+ "@opentinyvue/vue-common": "~3.29.0",
13
+ "@opentinyvue/vue-directive": "~3.29.0",
14
+ "@opentinyvue/vue-dropdown": "~3.29.0",
15
+ "@opentinyvue/vue-dropdown-item": "~3.29.0",
16
+ "@opentinyvue/vue-dropdown-menu": "~3.29.0",
17
+ "@opentinyvue/vue-exception": "~3.29.0",
18
+ "@opentinyvue/vue-icon": "~3.29.0",
19
+ "@opentinyvue/vue-loading": "~3.29.0",
20
+ "@opentinyvue/vue-locale": "~3.29.0",
21
+ "@opentinyvue/vue-modal": "~3.29.0",
22
+ "@opentinyvue/vue-pager": "~3.29.0",
23
+ "@opentinyvue/vue-renderless": "~3.29.0",
24
+ "@opentinyvue/vue-tag": "~3.29.0",
25
+ "@opentinyvue/vue-theme": "~3.29.0",
26
+ "@opentinyvue/vue-tooltip": "~3.29.0"
27
27
  },
28
28
  "types": "index.d.ts",
29
29
  "scripts": {
package/src/config.d.ts CHANGED
@@ -63,6 +63,7 @@ declare const GlobalConfig: {
63
63
  defaultTreeIndent: number;
64
64
  defaultTreeSpacing: number;
65
65
  rowId: string;
66
+ $rowIndex: symbol;
66
67
  version: number;
67
68
  optimization: {
68
69
  animat: boolean;
@@ -283,6 +283,7 @@ declare const _default: hooks.DefineComponent<{
283
283
  isRight: boolean;
284
284
  }>;
285
285
  resolveMap: {};
286
+ columnSlotsWeakMap: WeakMap<object, any>;
286
287
  }, {
287
288
  asyncRenderMap: {};
288
289
  ctxMenuStore: {