stk-table-vue 1.0.0-beta.4 → 1.0.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.
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * name: stk-table-vue
3
- * version: v1.0.0-beta.4
3
+ * version: v1.0.0
4
4
  * description: High performance realtime virtual table for vue3 and vue2.7
5
5
  * author: japlus
6
6
  * homepage: https://ja-plus.github.io/stk-table-vue/
7
7
  * license: MIT
8
8
  */
9
- import { t as StkTable_default } from "./StkTable-Bz-71TiQ.js";
9
+ import { t as StkTable_default } from "./StkTable-QUd4TJCF.js";
10
10
  import { createElementBlock, createElementVNode, createVNode, defineComponent, h, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, withModifiers } from "vue";
11
11
  //#region src/StkTable/custom-cells/FilterCell/Dropdown/index.vue?vue&type=script&setup=true&lang.ts
12
12
  var DROPDOWN_DEFAULT_WIDTH = 300;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: stk-table-vue
3
- * version: v1.0.0-beta.4
3
+ * version: v1.0.0
4
4
  * description: High performance realtime virtual table for vue3 and vue2.7
5
5
  * author: japlus
6
6
  * homepage: https://ja-plus.github.io/stk-table-vue/
@@ -543,6 +543,7 @@ function useAreaSelection(props, emits, tableContainerRef, dataSourceCopy, table
543
543
  return [
544
544
  ranges.length,
545
545
  ranges.length > 0 ? JSON.stringify(ranges.map((r) => r.index)) : "",
546
+ vsx.scrollLeft,
546
547
  vs.startIndex,
547
548
  vs.endIndex,
548
549
  vsx.startIndex,
@@ -3201,7 +3202,10 @@ function useVirtualScroll(props, tableContainerRef, trRef, dataSourceCopy, table
3201
3202
  updateVirtualScrollX(scrollLeft);
3202
3203
  }
3203
3204
  let vue2ScrollYTimeout = null;
3204
- /** every row actual height */
3205
+ /**
3206
+ * every row actual height.
3207
+ * FIXME: use a weak map instead of a plain map
3208
+ */
3205
3209
  const autoRowHeightMap = /* @__PURE__ */ new Map();
3206
3210
  /** 如果行高度有变化,则要调用此方法清除保存的行高 */
3207
3211
  function setAutoHeight(rowKey, height) {
@@ -4631,8 +4635,8 @@ var StkTable_default = /* @__PURE__ */ defineComponent({
4631
4635
  class: "vt-x-left",
4632
4636
  style: normalizeStyle(`min-width:${unref(theadVirtualX).offsetLeft}px;width:${unref(theadVirtualX).offsetLeft}px`)
4633
4637
  }, null, 4)) : createCommentVNode("", true),
4634
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col) => {
4635
- return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? "spacer" : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
4638
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col, _colIdx) => {
4639
+ return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
4636
4640
  key: 0,
4637
4641
  class: "vt-x-spacer",
4638
4642
  colspan: col.__VT_C_SP__
@@ -4686,8 +4690,8 @@ var StkTable_default = /* @__PURE__ */ defineComponent({
4686
4690
  class: "vt-x-left",
4687
4691
  style: normalizeStyle(`min-width:${unref(theadVirtualX).offsetLeft}px;width:${unref(theadVirtualX).offsetLeft}px`)
4688
4692
  }, null, 4)) : createCommentVNode("", true),
4689
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col) => {
4690
- return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? "spacer" : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
4693
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col, _colIdx) => {
4694
+ return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
4691
4695
  key: 0,
4692
4696
  class: "vt-x-spacer",
4693
4697
  colspan: col.__VT_C_SP__
@@ -4716,8 +4720,8 @@ var StkTable_default = /* @__PURE__ */ defineComponent({
4716
4720
  col: row.__EXP_C__
4717
4721
  }, () => [createTextVNode(toDisplayString(row.__EXP_R__ && row.__EXP_C__ && row.__EXP_R__[row.__EXP_C__.dataIndex] || ""), 1)])])], 8, _hoisted_12)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4718
4722
  unref(virtualX_on) ? (openBlock(), createElementBlock("td", _hoisted_14)) : createCommentVNode("", true),
4719
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col) => {
4720
- return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? "spacer" : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
4723
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col, _colIdx) => {
4724
+ return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
4721
4725
  key: 0,
4722
4726
  class: "vt-x-spacer",
4723
4727
  colspan: col.__VT_C_SP__
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * name: stk-table-vue
3
- * version: v1.0.0-beta.4
3
+ * version: v1.0.0
4
4
  * description: High performance realtime virtual table for vue3 and vue2.7
5
5
  * author: japlus
6
6
  * homepage: https://ja-plus.github.io/stk-table-vue/
7
7
  * license: MIT
8
8
  */
9
- import { a as insertToOrderedArray, i as binarySearch, n as registerFeature, o as strCompare, r as useAreaSelection, s as tableSort, t as StkTable_default } from "./StkTable-Bz-71TiQ.js";
9
+ import { a as insertToOrderedArray, i as binarySearch, n as registerFeature, o as strCompare, r as useAreaSelection, s as tableSort, t as StkTable_default } from "./StkTable-QUd4TJCF.js";
10
10
  import { Fragment, computed, createApp, createBlock, createElementBlock, createElementVNode, createTextVNode, defineComponent, getCurrentInstance, h, markRaw, nextTick, normalizeClass, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, watch, withModifiers } from "vue";
11
11
  //#region src/StkTable/custom-cells/FilterCell/Dropdown/index.ts
12
12
  var DropdownIns = null;
@@ -15,7 +15,7 @@ async function getDropdownIns() {
15
15
  const div = document.createElement("div");
16
16
  div.classList.add("stk-filter-dropdown-wrapper");
17
17
  document.body.appendChild(div);
18
- DropdownIns = createApp(await import("./Dropdown-CtiuG-7-.js").then((module) => module.default)).mount(div);
18
+ DropdownIns = createApp(await import("./Dropdown-Clc70S1z.js").then((module) => module.default)).mount(div);
19
19
  }
20
20
  return DropdownIns;
21
21
  }
@@ -311,13 +311,13 @@ function createEditableCell(option) {
311
311
  return { EditableCell: EditableCellComponent };
312
312
  }
313
313
  //#endregion
314
- //#region src/StkTable/custom-cells/CheckboxCell/Checkbox.vue?vue&type=script&setup=true&lang.ts
314
+ //#region src/StkTable/custom-cells/CheckboxCell/CheckboxCell.vue?vue&type=script&setup=true&lang.ts
315
315
  var _hoisted_1 = { class: "stk-checkbox-cell" };
316
316
  var _hoisted_2 = ["checked", ".indeterminate"];
317
317
  //#endregion
318
- //#region src/StkTable/custom-cells/CheckboxCell/Checkbox.vue
319
- var Checkbox_default = /* @__PURE__ */ defineComponent({
320
- __name: "Checkbox",
318
+ //#region src/StkTable/custom-cells/CheckboxCell/CheckboxCell.vue
319
+ var CheckboxCell_default = /* @__PURE__ */ defineComponent({
320
+ __name: "CheckboxCell",
321
321
  props: {
322
322
  checked: { type: Boolean },
323
323
  indeterminate: { type: Boolean },
@@ -326,17 +326,33 @@ var Checkbox_default = /* @__PURE__ */ defineComponent({
326
326
  emits: ["change"],
327
327
  setup(__props, { emit: __emit }) {
328
328
  const emit = __emit;
329
+ /** 防重保护:部分 UI 库(Element Plus / Arco Design)会同时触发多个事件 */
330
+ let _lastValue;
329
331
  function handleChange(e) {
330
- emit("change", typeof e === "boolean" ? e : e.target.checked);
332
+ var _e$target;
333
+ let checked;
334
+ if (typeof e === "boolean") checked = e;
335
+ else if ((e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.checked) !== void 0) checked = e.target.checked;
336
+ else checked = !!e;
337
+ if (checked === _lastValue) return;
338
+ _lastValue = checked;
339
+ emit("change", checked);
331
340
  }
332
341
  return (_ctx, _cache) => {
333
342
  return openBlock(), createElementBlock("div", _hoisted_1, [__props.customComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.customComponent), {
334
343
  key: 0,
335
344
  "model-value": __props.checked,
345
+ checked: __props.checked,
336
346
  indeterminate: __props.indeterminate,
337
347
  "onUpdate:modelValue": handleChange,
348
+ "onUpdate:checked": handleChange,
349
+ onChange: handleChange,
338
350
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
339
- }, null, 8, ["model-value", "indeterminate"])) : (openBlock(), createElementBlock("input", {
351
+ }, null, 40, [
352
+ "model-value",
353
+ "checked",
354
+ "indeterminate"
355
+ ])) : (openBlock(), createElementBlock("input", {
340
356
  key: 1,
341
357
  type: "checkbox",
342
358
  checked: __props.checked,
@@ -409,7 +425,7 @@ function createCheckboxCell(options) {
409
425
  props.row[field] = checked;
410
426
  options === null || options === void 0 || (_options$onChange = options.onChange) === null || _options$onChange === void 0 || _options$onChange.call(options, checked, props.row);
411
427
  }
412
- return () => h(Checkbox_default, {
428
+ return () => h(CheckboxCell_default, {
413
429
  checked: isChecked.value,
414
430
  customComponent,
415
431
  onChange: handleChange
@@ -447,7 +463,7 @@ function createCheckboxCell(options) {
447
463
  });
448
464
  options === null || options === void 0 || (_options$onSelectAll = options.onSelectAll) === null || _options$onSelectAll === void 0 || _options$onSelectAll.call(options, checked);
449
465
  }
450
- return () => h(Checkbox_default, {
466
+ return () => h(CheckboxCell_default, {
451
467
  checked: isCheckAll.value,
452
468
  indeterminate: isIndeterminate.value,
453
469
  customComponent,
package/lib/style.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: stk-table-vue
3
- * version: v1.0.0-beta.4
3
+ * version: v1.0.0
4
4
  * description: High performance realtime virtual table for vue3 and vue2.7
5
5
  * author: japlus
6
6
  * homepage: https://ja-plus.github.io/stk-table-vue/
@@ -119,6 +119,7 @@
119
119
  width:100%;
120
120
  font-size:inherit;
121
121
  line-height:inherit;
122
+ font-family:inherit;
122
123
  box-sizing:border-box;
123
124
  outline:none;
124
125
  padding:0 4px;
package/package.json CHANGED
@@ -1,85 +1,89 @@
1
- {
2
- "name": "stk-table-vue",
3
- "version": "1.0.0-beta.4",
4
- "description": "High performance realtime virtual table for vue3 and vue2.7",
5
- "main": "./lib/stk-table-vue.js",
6
- "types": "./lib/src/StkTable/index.d.ts",
7
- "homepage": "https://ja-plus.github.io/stk-table-vue/",
8
- "author": "japlus",
9
- "license": "MIT",
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/ja-plus/stk-table-vue"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/ja-plus/stk-table-vue/issues"
16
- },
17
- "packageManager": "pnpm@10.7.0",
18
- "directories": {
19
- "test": "test"
20
- },
21
- "type": "module",
22
- "scripts": {
23
- "dev": "vite",
24
- "build": "vite build",
25
- "test": "vitest",
26
- "docs:dev": "vitepress dev docs-src",
27
- "docs:build": "vitepress build docs-src",
28
- "docs:preview": "vitepress preview docs-src",
29
- "docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
30
- },
31
- "keywords": [
32
- "vue",
33
- "table",
34
- "vue-table",
35
- "virtual table",
36
- "virtual-scroll",
37
- "data-table",
38
- "vue-component",
39
- "grid",
40
- "vue2",
41
- "vue3",
42
- "highlight",
43
- "sticky",
44
- "virtual",
45
- "list"
46
- ],
47
- "files": [
48
- "lib",
49
- "src"
50
- ],
51
- "devDependencies": {
52
- "@chenglou/pretext": "^0.0.8",
53
- "@types/mockjs": "^1.0.10",
54
- "@types/node": "^22.18.10",
55
- "@typescript-eslint/eslint-plugin": "^7.7.0",
56
- "@typescript-eslint/parser": "^7.7.0",
57
- "@vitejs/plugin-vue": "^6.0.5",
58
- "@vue/test-utils": "^2.4.6",
59
- "eslint": "^8.57.0",
60
- "eslint-config-prettier": "^9.1.0",
61
- "eslint-plugin-html": "^8.1.0",
62
- "eslint-plugin-prettier": "^5.1.3",
63
- "eslint-plugin-vue": "^9.25.0",
64
- "happy-dom": "^18.0.1",
65
- "ja-contextmenu": "^1.11.0",
66
- "less": "^4.2.0",
67
- "mitt": "^3.0.1",
68
- "mockjs": "^1.1.0",
69
- "postcss": "^8.4.47",
70
- "postcss-discard-comments": "^6.0.2",
71
- "postcss-preset-env": "^9.5.11",
72
- "prettier": "^3.2.5",
73
- "stk-table-vue": "^0.11.15",
74
- "typescript": "^5.8.3",
75
- "vite": "^8.1.2",
76
- "vite-plugin-banner": "^0.8.1",
77
- "vite-plugin-dts": "3.9.1",
78
- "vitepress": "^1.6.4",
79
- "vitepress-demo-plugin": "^1.5.1",
80
- "vitepress-plugin-llms": "^1.13.2",
81
- "vitest": "^4.1.9",
82
- "vue": "^3.5.39",
83
- "vue-eslint-parser": "^9.4.2"
84
- }
85
- }
1
+ {
2
+ "name": "stk-table-vue",
3
+ "version": "1.0.0",
4
+ "description": "High performance realtime virtual table for vue3 and vue2.7",
5
+ "main": "./lib/stk-table-vue.js",
6
+ "types": "./lib/src/StkTable/index.d.ts",
7
+ "homepage": "https://ja-plus.github.io/stk-table-vue/",
8
+ "author": "japlus",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/ja-plus/stk-table-vue"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/ja-plus/stk-table-vue/issues"
16
+ },
17
+ "packageManager": "pnpm@10.7.0",
18
+ "directories": {
19
+ "test": "test"
20
+ },
21
+ "type": "module",
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "vite build",
25
+ "test": "vitest",
26
+ "docs:dev": "vitepress dev docs-src",
27
+ "docs:build": "vitepress build docs-src",
28
+ "docs:preview": "vitepress preview docs-src",
29
+ "docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
30
+ },
31
+ "keywords": [
32
+ "vue",
33
+ "table",
34
+ "vue-table",
35
+ "virtual table",
36
+ "virtual-scroll",
37
+ "data-table",
38
+ "vue-component",
39
+ "grid",
40
+ "vue2",
41
+ "vue3",
42
+ "highlight",
43
+ "sticky",
44
+ "virtual",
45
+ "list"
46
+ ],
47
+ "files": [
48
+ "lib",
49
+ "src"
50
+ ],
51
+ "devDependencies": {
52
+ "@arco-design/web-vue": "^2.58.0",
53
+ "@chenglou/pretext": "^0.0.8",
54
+ "@types/mockjs": "^1.0.10",
55
+ "@types/node": "^22.18.10",
56
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
57
+ "@typescript-eslint/parser": "^7.7.0",
58
+ "@vitejs/plugin-vue": "^6.0.5",
59
+ "@vue/test-utils": "^2.4.6",
60
+ "ant-design-vue": "4",
61
+ "element-plus": "^2.14.3",
62
+ "eslint": "^8.57.0",
63
+ "eslint-config-prettier": "^9.1.0",
64
+ "eslint-plugin-html": "^8.1.0",
65
+ "eslint-plugin-prettier": "^5.1.3",
66
+ "eslint-plugin-vue": "^9.25.0",
67
+ "happy-dom": "^18.0.1",
68
+ "ja-contextmenu": "^1.11.0",
69
+ "less": "^4.2.0",
70
+ "mitt": "^3.0.1",
71
+ "mockjs": "^1.1.0",
72
+ "naive-ui": "2",
73
+ "postcss": "^8.4.47",
74
+ "postcss-discard-comments": "^6.0.2",
75
+ "postcss-preset-env": "^9.5.11",
76
+ "prettier": "^3.2.5",
77
+ "stk-table-vue": "^0.11.15",
78
+ "typescript": "^5.8.3",
79
+ "vite": "^8.1.2",
80
+ "vite-plugin-banner": "^0.8.1",
81
+ "vite-plugin-dts": "3.9.1",
82
+ "vitepress": "^1.6.4",
83
+ "vitepress-demo-plugin": "^1.5.1",
84
+ "vitepress-plugin-llms": "^1.13.2",
85
+ "vitest": "^4.1.9",
86
+ "vue": "^3.5.39",
87
+ "vue-eslint-parser": "^9.4.2"
88
+ }
89
+ }
@@ -119,7 +119,7 @@
119
119
  class="vt-x-left"
120
120
  :style="`min-width:${theadVirtualX.offsetLeft}px;width:${theadVirtualX.offsetLeft}px`"
121
121
  ></td>
122
- <template v-for="col in virtualX_columnPart" :key="col.__VT_C_SP__ ? 'spacer' : colKeyGen(col)">
122
+ <template v-for="(col, _colIdx) in virtualX_columnPart" :key="col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen(col)">
123
123
  <td v-if="col.__VT_C_SP__" class="vt-x-spacer" :colspan="col.__VT_C_SP__"></td>
124
124
  <td v-else v-bind="getTFProps(col)">
125
125
  <component
@@ -157,7 +157,7 @@
157
157
  class="vt-x-left"
158
158
  :style="`min-width:${theadVirtualX.offsetLeft}px;width:${theadVirtualX.offsetLeft}px`"
159
159
  ></td>
160
- <template v-for="col in virtualX_columnPart" :key="col.__VT_C_SP__ ? 'spacer' : colKeyGen(col)">
160
+ <template v-for="(col, _colIdx) in virtualX_columnPart" :key="col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen(col)">
161
161
  <td v-if="col.__VT_C_SP__" class="vt-x-spacer" :colspan="col.__VT_C_SP__"></td>
162
162
  <td v-else :style="cellStyleMap[TagType.TD].get(colKeyGen(col))"></td>
163
163
  </template>
@@ -178,7 +178,7 @@
178
178
  </td>
179
179
  <template v-else>
180
180
  <td v-if="virtualX_on" class="vt-x-left"></td>
181
- <template v-for="col in virtualX_columnPart" :key="col.__VT_C_SP__ ? 'spacer' : colKeyGen(col)">
181
+ <template v-for="(col, _colIdx) in virtualX_columnPart" :key="col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen(col)">
182
182
  <td v-if="col.__VT_C_SP__" class="vt-x-spacer" :colspan="col.__VT_C_SP__"></td>
183
183
  <td
184
184
  v-else-if="!shouldHideCell(row, col)"
@@ -4,8 +4,11 @@
4
4
  :is="customComponent"
5
5
  v-if="customComponent"
6
6
  :model-value="checked"
7
+ :checked="checked"
7
8
  :indeterminate="indeterminate"
8
9
  @update:model-value="handleChange"
10
+ @update:checked="handleChange"
11
+ @change="handleChange"
9
12
  @click.stop
10
13
  />
11
14
  <input
@@ -34,8 +37,20 @@ const emit = defineEmits<{
34
37
  (e: 'change', checked: boolean): void;
35
38
  }>();
36
39
 
37
- function handleChange(e: Event | boolean) {
38
- const checked = typeof e === 'boolean' ? e : (e.target as HTMLInputElement).checked;
40
+ /** 防重保护:部分 UI 库(Element Plus / Arco Design)会同时触发多个事件 */
41
+ let _lastValue: boolean | undefined;
42
+
43
+ function handleChange(e: any) {
44
+ let checked: boolean;
45
+ if (typeof e === 'boolean') {
46
+ checked = e;
47
+ } else if (e?.target?.checked !== undefined) {
48
+ checked = e.target.checked;
49
+ } else {
50
+ checked = !!e;
51
+ }
52
+ if (checked === _lastValue) return;
53
+ _lastValue = checked;
39
54
  emit('change', checked);
40
55
  }
41
56
  </script>
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable vue/one-component-per-file */
2
2
  import type { CustomCellProps } from '../../types';
3
3
  import { computed, defineComponent, getCurrentInstance, h, markRaw } from 'vue';
4
- import CheckboxVue from './Checkbox.vue';
4
+ import CheckboxVue from './CheckboxCell.vue';
5
5
 
6
6
  /** createCheckboxCell 配置选项 */
7
7
  export interface createCheckboxCellOptions<T = any> {
@@ -2,4 +2,4 @@
2
2
  export { createCheckboxCell } from './createCheckboxCell';
3
3
  export type { createCheckboxCellOptions } from './createCheckboxCell';
4
4
 
5
- import './Checkbox.less';
5
+ import './CheckboxCell.less';
@@ -10,6 +10,7 @@
10
10
  width: 100%;
11
11
  font-size: inherit;
12
12
  line-height: inherit;
13
+ font-family: inherit;
13
14
  box-sizing: border-box;
14
15
  outline: none;
15
16
  padding: 0 4px;
@@ -296,6 +296,7 @@ export function useAreaSelection<DT extends Record<string, any>>(
296
296
  return [
297
297
  ranges.length,
298
298
  ranges.length > 0 ? JSON.stringify(ranges.map(r => r.index)) : '',
299
+ vsx.scrollLeft,
299
300
  vs.startIndex,
300
301
  vs.endIndex,
301
302
  vsx.startIndex,
@@ -402,7 +402,10 @@ export function useVirtualScroll(
402
402
 
403
403
  let vue2ScrollYTimeout: null | number = null;
404
404
 
405
- /** every row actual height */
405
+ /**
406
+ * every row actual height.
407
+ * FIXME: use a weak map instead of a plain map
408
+ */
406
409
  const autoRowHeightMap = new Map<string, number>();
407
410
  /** 如果行高度有变化,则要调用此方法清除保存的行高 */
408
411
  function setAutoHeight(rowKey: UniqKey, height?: number | null) {