@sdata/web-vue 3.3.1 → 3.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.
Files changed (96) hide show
  1. package/dist/sd.css +14 -4
  2. package/dist/sd.min.css +1 -1
  3. package/es/_components/select-view/select-view.d.ts +1 -1
  4. package/es/_components/select-view/style/index.css +1 -1
  5. package/es/_components/virtual-list/interface.d.ts +13 -6
  6. package/es/_components/virtual-list/style/index.scss +3 -1
  7. package/es/_components/virtual-list/virtual-list.vue.d.ts +31 -77
  8. package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +180 -503
  9. package/es/auto-complete/auto-complete.d.ts +1 -1
  10. package/es/auto-complete/auto-complete.js +3 -1
  11. package/es/auto-complete/index.d.ts +3 -3
  12. package/es/card/card.d.ts +3 -3
  13. package/es/card/index.d.ts +6 -6
  14. package/es/cascader/base-cascader-panel.d.ts +1 -1
  15. package/es/cascader/cascader-option.d.ts +1 -1
  16. package/es/cascader/cascader-option.js +8 -3
  17. package/es/cascader/cascader-panel.vue.d.ts +1 -1
  18. package/es/cascader/cascader-search-panel.d.ts +1 -1
  19. package/es/cascader/cascader.vue.d.ts +2 -2
  20. package/es/cascader/style/index.css +4 -1
  21. package/es/cascader/style/index.d.ts +1 -0
  22. package/es/cascader/style/index.scss +4 -1
  23. package/es/config-provider/config-provider.vue.d.ts +1 -1
  24. package/es/config-provider/index.d.ts +3 -3
  25. package/es/descriptions/descriptions.d.ts +2 -2
  26. package/es/descriptions/index.d.ts +6 -6
  27. package/es/drawer/drawer.vue.d.ts +2 -2
  28. package/es/drawer/index.d.ts +5 -5
  29. package/es/dropdown/dropdown-panel.vue.d.ts +1 -1
  30. package/es/ellipsis/ellipsis.vue.d.ts +1 -1
  31. package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/es/ellipsis/index.d.ts +6 -6
  33. package/es/ellipsis/performant-ellipsis.vue.d.ts +1 -1
  34. package/es/image/preview-group.vue.d.ts +1 -1
  35. package/es/index.css +14 -4
  36. package/es/input-tag/style/index.css +1 -1
  37. package/es/link/index.d.ts +6 -6
  38. package/es/link/link.vue.d.ts +2 -2
  39. package/es/list/list-item-meta.vue.d.ts +2 -2
  40. package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +10 -3
  41. package/es/list/style/index.css +5 -0
  42. package/es/list/style/index.d.ts +1 -0
  43. package/es/list/style/index.scss +6 -0
  44. package/es/menu/item.d.ts +1 -1
  45. package/es/modal/index.d.ts +5 -5
  46. package/es/modal/modal.vue.d.ts +2 -2
  47. package/es/progress/line.vue.d.ts +1 -1
  48. package/es/qr-code/index.d.ts +12 -12
  49. package/es/qr-code/qr-code.vue.d.ts +4 -4
  50. package/es/select/index.d.ts +5 -5
  51. package/es/select/select-dropdown.vue.d.ts +1 -1
  52. package/es/select/select.d.ts +2 -2
  53. package/es/select/select.js +4 -2
  54. package/es/select/style/index.d.ts +1 -0
  55. package/es/slider/index.d.ts +3 -3
  56. package/es/slider/slider.vue.d.ts +1 -1
  57. package/es/spin/index.d.ts +3 -3
  58. package/es/spin/spin.d.ts +1 -1
  59. package/es/statistic/index.d.ts +3 -3
  60. package/es/statistic/statistic.vue.d.ts +1 -1
  61. package/es/table/index.d.ts +13 -7
  62. package/es/table/style/index.css +4 -1
  63. package/es/table/style/index.scss +6 -1
  64. package/es/table/table-column.d.ts +1 -1
  65. package/es/table/table-td.d.ts +1 -1
  66. package/es/table/table.d.ts +3 -1
  67. package/es/table/table.js +66 -34
  68. package/es/tabs/index.d.ts +3 -3
  69. package/es/tabs/tabs.d.ts +1 -1
  70. package/es/tag/index.d.ts +6 -6
  71. package/es/tag/style/index.css +1 -1
  72. package/es/tag/style/index.scss +1 -1
  73. package/es/tag/tag.vue.d.ts +2 -2
  74. package/es/timeline/index.d.ts +6 -6
  75. package/es/timeline/timeline.d.ts +3 -3
  76. package/es/tree/base-node.vue.d.ts +4 -8
  77. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +14 -16
  78. package/es/tree/tree.vue.d.ts +2 -2
  79. package/es/tree-select/tree-select.vue.d.ts +4 -4
  80. package/es/typography/base.d.ts +1 -1
  81. package/es/watermark/index.d.ts +3 -3
  82. package/es/watermark/watermark.d.ts +1 -1
  83. package/json/web-types.json +1 -1
  84. package/package.json +3 -3
  85. package/es/_components/virtual-list/use-virtual-size.js +0 -94
  86. package/es/_components/virtual-list-v2/hooks/use-size.d.ts +0 -17
  87. package/es/_components/virtual-list-v2/hooks/use-size.js +0 -95
  88. package/es/_components/virtual-list-v2/index.d.ts +0 -2
  89. package/es/_components/virtual-list-v2/index.js +0 -5
  90. package/es/_components/virtual-list-v2/interface.d.ts +0 -44
  91. package/es/_components/virtual-list-v2/virtual-list-item.d.ts +0 -22
  92. package/es/_components/virtual-list-v2/virtual-list-item.js +0 -37
  93. package/es/_components/virtual-list-v2/virtual-list.js +0 -47
  94. package/es/_components/virtual-list-v2/virtual-list.vue.d.ts +0 -749
  95. package/es/_components/virtual-list-v2/virtual-list.vue_vue_type_script_lang.js +0 -179
  96. package/es/_virtual/_plugin-vue_export-helper.js +0 -8
@@ -45,9 +45,9 @@ declare const Statistic: {
45
45
  type: import("vue").PropType<import("vue").CSSProperties>;
46
46
  };
47
47
  }>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
48
- start: boolean;
49
48
  animationDuration: number;
50
49
  animation: boolean;
50
+ start: boolean;
51
51
  format: string;
52
52
  precision: number;
53
53
  showGroupSeparator: boolean;
@@ -101,9 +101,9 @@ declare const Statistic: {
101
101
  type: import("vue").PropType<import("vue").CSSProperties>;
102
102
  };
103
103
  }>> & Readonly<{}>, {}, {}, {}, {}, {
104
- start: boolean;
105
104
  animationDuration: number;
106
105
  animation: boolean;
106
+ start: boolean;
107
107
  format: string;
108
108
  precision: number;
109
109
  showGroupSeparator: boolean;
@@ -154,9 +154,9 @@ declare const Statistic: {
154
154
  type: import("vue").PropType<import("vue").CSSProperties>;
155
155
  };
156
156
  }>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
157
- start: boolean;
158
157
  animationDuration: number;
159
158
  animation: boolean;
159
+ start: boolean;
160
160
  format: string;
161
161
  precision: number;
162
162
  showGroupSeparator: boolean;
@@ -92,9 +92,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
92
92
  type: PropType<CSSProperties>;
93
93
  };
94
94
  }>> & Readonly<{}>, {
95
- start: boolean;
96
95
  animationDuration: number;
97
96
  animation: boolean;
97
+ start: boolean;
98
98
  format: string;
99
99
  precision: number;
100
100
  showGroupSeparator: boolean;
@@ -76,7 +76,7 @@ declare const Table: {
76
76
  default: boolean;
77
77
  };
78
78
  virtualListProps: {
79
- type: import("vue").PropType<import("../_components/virtual-list-v2/interface").VirtualListProps>;
79
+ type: import("vue").PropType<import("../_components/virtual-list/interface").VirtualListProps>;
80
80
  };
81
81
  spanMethod: {
82
82
  type: import("vue").PropType<(data: {
@@ -201,6 +201,7 @@ declare const Table: {
201
201
  selfClearFilters: (dataIndex?: string | string[]) => void;
202
202
  selfResetSorters: () => void;
203
203
  selfClearSorters: () => void;
204
+ selfScrollIntoView: (options: import("../_components/virtual-list/interface").ScrollIntoViewOptions) => void | undefined;
204
205
  }, {}, {}, {
205
206
  selectAll(checked?: boolean): void;
206
207
  select(rowKey: string | number | (string | number)[], checked?: boolean): void;
@@ -210,6 +211,7 @@ declare const Table: {
210
211
  clearFilters(dataIndex?: string | string[]): void;
211
212
  resetSorters(): void;
212
213
  clearSorters(): void;
214
+ scrollIntoView(options: import("../_components/virtual-list/interface").ScrollIntoViewOptions): void | undefined;
213
215
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
214
216
  'update:selectedKeys': (_rowKeys: (string | number)[]) => true;
215
217
  'update:expandedKeys': (_rowKeys: (string | number)[]) => true;
@@ -331,7 +333,7 @@ declare const Table: {
331
333
  default: boolean;
332
334
  };
333
335
  virtualListProps: {
334
- type: import("vue").PropType<import("../_components/virtual-list-v2/interface").VirtualListProps>;
336
+ type: import("vue").PropType<import("../_components/virtual-list/interface").VirtualListProps>;
335
337
  };
336
338
  spanMethod: {
337
339
  type: import("vue").PropType<(data: {
@@ -456,6 +458,7 @@ declare const Table: {
456
458
  selfClearFilters: (dataIndex?: string | string[]) => void;
457
459
  selfResetSorters: () => void;
458
460
  selfClearSorters: () => void;
461
+ selfScrollIntoView: (options: import("../_components/virtual-list/interface").ScrollIntoViewOptions) => void | undefined;
459
462
  }, {}, {}, {
460
463
  selectAll(checked?: boolean): void;
461
464
  select(rowKey: string | number | (string | number)[], checked?: boolean): void;
@@ -465,6 +468,7 @@ declare const Table: {
465
468
  clearFilters(dataIndex?: string | string[]): void;
466
469
  resetSorters(): void;
467
470
  clearSorters(): void;
471
+ scrollIntoView(options: import("../_components/virtual-list/interface").ScrollIntoViewOptions): void | undefined;
468
472
  }, {
469
473
  size: "small" | "mini" | "medium" | "large";
470
474
  data: import("./interface").TableData[];
@@ -560,7 +564,7 @@ declare const Table: {
560
564
  default: boolean;
561
565
  };
562
566
  virtualListProps: {
563
- type: import("vue").PropType<import("../_components/virtual-list-v2/interface").VirtualListProps>;
567
+ type: import("vue").PropType<import("../_components/virtual-list/interface").VirtualListProps>;
564
568
  };
565
569
  spanMethod: {
566
570
  type: import("vue").PropType<(data: {
@@ -685,6 +689,7 @@ declare const Table: {
685
689
  selfClearFilters: (dataIndex?: string | string[]) => void;
686
690
  selfResetSorters: () => void;
687
691
  selfClearSorters: () => void;
692
+ selfScrollIntoView: (options: import("../_components/virtual-list/interface").ScrollIntoViewOptions) => void | undefined;
688
693
  }, {}, {}, {
689
694
  selectAll(checked?: boolean): void;
690
695
  select(rowKey: string | number | (string | number)[], checked?: boolean): void;
@@ -694,6 +699,7 @@ declare const Table: {
694
699
  clearFilters(dataIndex?: string | string[]): void;
695
700
  resetSorters(): void;
696
701
  clearSorters(): void;
702
+ scrollIntoView(options: import("../_components/virtual-list/interface").ScrollIntoViewOptions): void | undefined;
697
703
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
698
704
  'update:selectedKeys': (_rowKeys: (string | number)[]) => true;
699
705
  'update:expandedKeys': (_rowKeys: (string | number)[]) => true;
@@ -832,7 +838,7 @@ declare const Table: {
832
838
  default: () => {};
833
839
  };
834
840
  type: {
835
- type: import("vue").PropType<"normal" | "checkbox" | "radio" | "expand" | "operation">;
841
+ type: import("vue").PropType<"normal" | "radio" | "checkbox" | "expand" | "operation">;
836
842
  default: string;
837
843
  };
838
844
  operations: {
@@ -886,7 +892,7 @@ declare const Table: {
886
892
  default: () => {};
887
893
  };
888
894
  type: {
889
- type: import("vue").PropType<"normal" | "checkbox" | "radio" | "expand" | "operation">;
895
+ type: import("vue").PropType<"normal" | "radio" | "checkbox" | "expand" | "operation">;
890
896
  default: string;
891
897
  };
892
898
  operations: {
@@ -928,7 +934,7 @@ declare const Table: {
928
934
  default: boolean;
929
935
  };
930
936
  }>> & Readonly<{}>, {
931
- type: "normal" | "checkbox" | "radio" | "expand" | "operation";
937
+ type: "normal" | "radio" | "checkbox" | "expand" | "operation";
932
938
  summary: boolean;
933
939
  column: import("./interface").TableColumnData;
934
940
  dataColumns: import("./interface").TableColumnData[];
@@ -1051,8 +1057,8 @@ declare const Table: {
1051
1057
  default: boolean;
1052
1058
  };
1053
1059
  }>> & Readonly<{}>, {
1054
- ellipsis: boolean;
1055
1060
  tooltip: boolean | Record<string, any>;
1061
+ ellipsis: boolean;
1056
1062
  filterable: import("./interface").TableFilterable;
1057
1063
  sortable: import("./interface").TableSortable;
1058
1064
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -461,6 +461,9 @@
461
461
  width: 100%;
462
462
  min-height: 0;
463
463
  }
464
+ .sd-table-container.sd-table-scroll-y {
465
+ flex: 1 1 auto;
466
+ }
464
467
  .sd-table-container .sd-table-content {
465
468
  display: flex;
466
469
  flex-direction: column;
@@ -759,7 +762,7 @@
759
762
  margin-bottom: 12px;
760
763
  }
761
764
 
762
- .sd-virtual-list > .sd-table-element {
765
+ .sd-virtual-list > .sd-table-element, .sd-virtual-list > .sd-virtual-list-scroller > .sd-table-element {
763
766
  width: auto;
764
767
  }
765
768
 
@@ -605,6 +605,10 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
605
605
  width: 100%;
606
606
  min-height: 0;
607
607
 
608
+ &.#{$table-prefix-cls}-scroll-y {
609
+ flex: 1 1 auto;
610
+ }
611
+
608
612
  // chrome not fluent: https://codepen.io/quanqqq/pen/BaLpEQd?editors==0010
609
613
  // border-radius: $table-border-radius $table-border-radius 0 0 0;
610
614
 
@@ -983,7 +987,8 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
983
987
  }
984
988
 
985
989
  .#{theme.$prefix}-virtual-list {
986
- & > .#{$table-prefix-cls}-element {
990
+ & > .#{$table-prefix-cls}-element,
991
+ & > .#{theme.$prefix}-virtual-list-scroller > .#{$table-prefix-cls}-element {
987
992
  width: auto;
988
993
  }
989
994
  }
@@ -112,8 +112,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
112
112
  default: boolean;
113
113
  };
114
114
  }>> & Readonly<{}>, {
115
- ellipsis: boolean;
116
115
  tooltip: boolean | Record<string, any>;
116
+ ellipsis: boolean;
117
117
  filterable: TableFilterable;
118
118
  sortable: TableSortable;
119
119
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -109,7 +109,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
109
109
  default: boolean;
110
110
  };
111
111
  }>> & Readonly<{}>, {
112
- type: "normal" | "checkbox" | "radio" | "expand" | "operation";
112
+ type: "normal" | "radio" | "checkbox" | "expand" | "operation";
113
113
  summary: boolean;
114
114
  column: TableColumnData;
115
115
  dataColumns: TableColumnData[];
@@ -1,8 +1,8 @@
1
1
  import type { PropType } from 'vue';
2
+ import type { ScrollIntoViewOptions, VirtualListProps } from '../_components/virtual-list/interface';
2
3
  import type { Size } from '../_utils/constant';
3
4
  import type { BaseType } from '../_utils/types';
4
5
  import type { TableBorder, TableChangeExtra, TableColumnData, TableComponents, TableData, TableDraggable, TableExpandable, TableOperationColumn, TablePagePosition, TableRowSelection } from './interface';
5
- import { VirtualListProps } from '../_components/virtual-list-v2/interface';
6
6
  import { PaginationProps } from '../pagination';
7
7
  import { ScrollbarProps } from '../scrollbar';
8
8
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -175,6 +175,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
175
175
  selfClearFilters: (dataIndex?: string | string[]) => void;
176
176
  selfResetSorters: () => void;
177
177
  selfClearSorters: () => void;
178
+ selfScrollIntoView: (options: ScrollIntoViewOptions) => void | undefined;
178
179
  }, {}, {}, {
179
180
  selectAll(checked?: boolean): void;
180
181
  select(rowKey: string | number | (string | number)[], checked?: boolean): void;
@@ -184,6 +185,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
184
185
  clearFilters(dataIndex?: string | string[]): void;
185
186
  resetSorters(): void;
186
187
  clearSorters(): void;
188
+ scrollIntoView(options: ScrollIntoViewOptions): void | undefined;
187
189
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
188
190
  'update:selectedKeys': (_rowKeys: (string | number)[]) => true;
189
191
  'update:expandedKeys': (_rowKeys: (string | number)[]) => true;
package/es/table/table.js CHANGED
@@ -3,20 +3,20 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
3
3
  import { getPrefixCls } from "../_utils/global-config.js";
4
4
  import { isArray, isFunction, isNull, isNumber, isObject, isString, isUndefined } from "../_utils/is.js";
5
5
  import resize_observer_default from "../_components/resize-observer.js";
6
+ import { _objectWithoutProperties } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectWithoutProperties.js";
7
+ import virtual_list_default from "../_components/virtual-list/index.js";
6
8
  import { omit } from "../_utils/omit.js";
7
9
  import { useComponentRef } from "../_hooks/use-component-ref.js";
8
10
  import { useScrollbar } from "../_hooks/use-scrollbar.js";
9
11
  import Scrollbar from "../scrollbar/index.js";
10
12
  import Spin from "../spin/index.js";
11
13
  import Empty from "../empty/index.js";
12
- import { _objectWithoutProperties } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectWithoutProperties.js";
13
14
  import { useChildrenComponents } from "../_hooks/use-children-components.js";
14
15
  import { debounce } from "../_utils/debounce.js";
15
16
  import IconMinus from "../icon/icon-minus/index.js";
16
17
  import IconPlus from "../icon/icon-plus/index.js";
17
18
  import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
18
19
  import Pagination from "../pagination/index.js";
19
- import virtual_list_v2_default from "../_components/virtual-list-v2/index.js";
20
20
  import { tableInjectionKey } from "./context.js";
21
21
  import { useColumnResize } from "./hooks/use-column-resize.js";
22
22
  import { useDrag } from "./hooks/use-drag.js";
@@ -37,11 +37,19 @@ import table_tr_default from "./table-tr.js";
37
37
  import { Fragment, computed, createVNode, defineComponent, inject, isVNode, mergeProps, onMounted, provide, reactive, ref, toRefs, watch, watchEffect } from "vue";
38
38
  //#region components/table/table.tsx
39
39
  var _excluded = [
40
+ "items",
40
41
  "data",
42
+ "keyField",
41
43
  "itemKey",
42
- "component",
44
+ "listTag",
45
+ "itemTag",
46
+ "listClass",
47
+ "itemClass",
43
48
  "listAttrs",
49
+ "listStyle",
50
+ "contentWrapperAttrs",
44
51
  "contentAttrs",
52
+ "component",
45
53
  "paddingPosition",
46
54
  "isStaticItemHeight",
47
55
  "fixedSize"
@@ -578,6 +586,7 @@ var table_default = /* @__PURE__ */ defineComponent({
578
586
  setup(props, { emit, slots }) {
579
587
  const { columns, rowKey, rowSelection, expandable, loadMore, filterIconAlignLeft, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAllRows, spanMethod, draggable, summarySpanMethod, scrollbar, showEmptyTree } = toRefs(props);
580
588
  const prefixCls = getPrefixCls("table");
589
+ const virtualListPrefixCls = getPrefixCls("virtual-list");
581
590
  const configCtx = inject(configProviderInjectionKey, void 0);
582
591
  const bordered = computed(() => {
583
592
  if (isObject(props.bordered)) return _objectSpread2(_objectSpread2({}, DEFAULT_BORDERED), props.bordered);
@@ -599,6 +608,7 @@ var table_default = /* @__PURE__ */ defineComponent({
599
608
  });
600
609
  const summaryRef = ref();
601
610
  const thRefs = ref({});
611
+ const virtualListRef = ref(null);
602
612
  const { componentRef: contentComRef, elementRef: contentRef } = useComponentRef("containerRef");
603
613
  const { componentRef: tbodyComRef, elementRef: tbodyRef } = useComponentRef("containerRef");
604
614
  const { elementRef: virtualRef } = useComponentRef("viewportRef");
@@ -610,7 +620,7 @@ var table_default = /* @__PURE__ */ defineComponent({
610
620
  }
611
621
  return contentRef.value;
612
622
  });
613
- const splitTable = computed(() => isScroll.value.y || props.stickyHeader || isVirtualList.value || isScroll.value.x && flattenData.value.length === 0);
623
+ const splitTable = computed(() => isScroll.value.y || props.stickyHeader !== false || isVirtualList.value || isScroll.value.x && flattenData.value.length === 0);
614
624
  const slotColumnMap = reactive(/* @__PURE__ */ new Map());
615
625
  const slotColumns = ref();
616
626
  watch([components, slotColumnMap], ([components, slotColumnMap]) => {
@@ -1084,8 +1094,8 @@ var table_default = /* @__PURE__ */ defineComponent({
1084
1094
  });
1085
1095
  const tableVirtualListProps = computed(() => {
1086
1096
  if (!props.virtualListProps) return {};
1087
- const _props$virtualListPro = props.virtualListProps, { data: _data, itemKey: _itemKey, component: _component, listAttrs: _listAttrs, contentAttrs: _contentAttrs, paddingPosition: _paddingPosition, isStaticItemHeight, fixedSize } = _props$virtualListPro;
1088
- return _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_props$virtualListPro, _excluded)), {}, { fixedSize: fixedSize !== null && fixedSize !== void 0 ? fixedSize : isStaticItemHeight });
1097
+ const _props$virtualListPro = props.virtualListProps, { items: _items, data: _data, keyField: _keyField, itemKey: _itemKey, listTag: _listTag, itemTag: _itemTag, listClass: _listClass, itemClass: _itemClass, listAttrs: _listAttrs, listStyle: _listStyle, contentWrapperAttrs: _contentWrapperAttrs, contentAttrs: _contentAttrs, component: _component, paddingPosition: _paddingPosition, isStaticItemHeight, fixedSize } = _props$virtualListPro;
1098
+ return _objectSpread2(_objectSpread2({ prerender: 20 }, _objectWithoutProperties(_props$virtualListPro, _excluded)), {}, { fixedSize: fixedSize !== null && fixedSize !== void 0 ? fixedSize : isStaticItemHeight });
1089
1099
  });
1090
1100
  const isVirtualList = computed(() => Boolean(props.virtualListProps));
1091
1101
  const thWidth = ref({});
@@ -1369,50 +1379,59 @@ var table_default = /* @__PURE__ */ defineComponent({
1369
1379
  });
1370
1380
  const renderContent = () => {
1371
1381
  if (splitTable.value) {
1372
- var _props$scroll13, _props$scroll14;
1382
+ var _props$scroll13, _props$scroll14, _props$scroll15;
1373
1383
  const top = isNumber(props.stickyHeader) ? `${props.stickyHeader}px` : void 0;
1374
- const bodyMaxHeight = isNumber((_props$scroll13 = props.scroll) === null || _props$scroll13 === void 0 ? void 0 : _props$scroll13.y) ? `${(_props$scroll14 = props.scroll) === null || _props$scroll14 === void 0 ? void 0 : _props$scroll14.y}px` : "100%";
1384
+ const isStringScrollY = isString((_props$scroll13 = props.scroll) === null || _props$scroll13 === void 0 ? void 0 : _props$scroll13.y);
1385
+ const bodyMaxHeight = isNumber((_props$scroll14 = props.scroll) === null || _props$scroll14 === void 0 ? void 0 : _props$scroll14.y) ? `${(_props$scroll15 = props.scroll) === null || _props$scroll15 === void 0 ? void 0 : _props$scroll15.y}px` : "100%";
1375
1386
  const _scrollbarProps$value = scrollbarProps.value, { outerStyle: bodyOuterStyle } = _scrollbarProps$value, bodyScrollbarRestProps = _objectWithoutProperties(_scrollbarProps$value, _excluded2);
1376
- const bodyOuterBaseStyle = {
1387
+ const bodyBaseStyle = isStringScrollY ? {
1388
+ height: bodyMaxHeight,
1389
+ minHeight: 0
1390
+ } : {
1377
1391
  maxHeight: bodyMaxHeight,
1378
1392
  minHeight: 0
1379
1393
  };
1380
- const bodyScrollbarOuterStyle = Array.isArray(bodyOuterStyle) ? [bodyOuterBaseStyle, ...bodyOuterStyle] : bodyOuterStyle ? [bodyOuterBaseStyle, bodyOuterStyle] : bodyOuterBaseStyle;
1394
+ const bodyScrollbarOuterStyle = Array.isArray(bodyOuterStyle) ? [bodyBaseStyle, ...bodyOuterStyle] : bodyOuterStyle ? [bodyBaseStyle, bodyOuterStyle] : bodyBaseStyle;
1395
+ const bodyComponentStyle = isStringScrollY ? { height: bodyMaxHeight } : { maxHeight: bodyMaxHeight };
1381
1396
  const BodyComponent = displayScrollbar.value ? Scrollbar : "div";
1382
1397
  return createVNode(Fragment, null, [
1383
1398
  props.showHeader && createVNode("div", {
1384
1399
  "ref": theadComRef,
1385
- "class": [`${prefixCls}-header`, { [`${prefixCls}-header-sticky`]: props.stickyHeader }],
1400
+ "class": [`${prefixCls}-header`, { [`${prefixCls}-header-sticky`]: props.stickyHeader !== false }],
1386
1401
  "style": { top }
1387
1402
  }, [createVNode("div", {
1388
1403
  "class": `${prefixCls}-element`,
1389
1404
  "style": headerStyle.value
1390
1405
  }, [renderHeader()])]),
1391
- createVNode(resize_observer_default, { "onResize": handleTbodyResize }, { default: () => [isVirtualList.value && flattenData.value.length ? createVNode(virtual_list_v2_default, mergeProps({
1406
+ createVNode(resize_observer_default, { "onResize": handleTbodyResize }, { default: () => [isVirtualList.value && flattenData.value.length ? createVNode(virtual_list_default, mergeProps({
1392
1407
  "ref": (ins) => {
1393
- if (ins === null || ins === void 0 ? void 0 : ins.$el) tbodyRef.value = ins.$el;
1408
+ if (ins === null || ins === void 0 ? void 0 : ins.$el) {
1409
+ var _ins$$el$querySelecto, _ins$$el;
1410
+ virtualListRef.value = ins;
1411
+ tbodyRef.value = ins.$el;
1412
+ virtualRef.value = (_ins$$el$querySelecto = (_ins$$el = ins.$el).querySelector) === null || _ins$$el$querySelecto === void 0 ? void 0 : _ins$$el$querySelecto.call(_ins$$el, `.${virtualListPrefixCls}-scroller`);
1413
+ } else {
1414
+ virtualListRef.value = null;
1415
+ tbodyRef.value = void 0;
1416
+ virtualRef.value = void 0;
1417
+ }
1394
1418
  },
1395
1419
  "class": `${prefixCls}-body`,
1396
- "data": flattenData.value,
1397
- "itemKey": "_key",
1398
- "component": {
1399
- list: "div",
1400
- content: "div"
1401
- },
1402
- "listAttrs": {
1403
- class: `${prefixCls}-element`,
1404
- style: contentStyle.value
1405
- },
1406
- "contentAttrs": { class: `${prefixCls}-tbody` },
1407
- "paddingPosition": "list",
1420
+ "items": flattenData.value,
1421
+ "keyField": "_key",
1422
+ "listTag": "div",
1423
+ "itemTag": "div",
1424
+ "listClass": `${prefixCls}-element`,
1425
+ "listStyle": contentStyle.value,
1426
+ "itemClass": `${prefixCls}-virtual-item`,
1408
1427
  "height": bodyMaxHeight
1409
1428
  }, tableVirtualListProps.value, {
1410
1429
  "scrollbar": displayScrollbar.value ? scrollbarProps.value : false,
1411
1430
  "onScroll": onTbodyScroll
1412
- }), { item: ({ item, index }) => renderRecord(item, index) }) : createVNode(BodyComponent, mergeProps({
1431
+ }), { item: ({ item, index }) => item ? renderRecord(item, index) : null }) : createVNode(BodyComponent, mergeProps({
1413
1432
  "ref": tbodyComRef,
1414
1433
  "class": `${prefixCls}-body`,
1415
- "style": { maxHeight: bodyMaxHeight }
1434
+ "style": bodyComponentStyle
1416
1435
  }, displayScrollbar.value ? _objectSpread2({ outerStyle: bodyScrollbarOuterStyle }, bodyScrollbarRestProps) : void 0, { "onScroll": onTbodyScroll }), { default: () => [createVNode("div", {
1417
1436
  "class": `${prefixCls}-element`,
1418
1437
  "style": contentStyle.value
@@ -1437,8 +1456,8 @@ var table_default = /* @__PURE__ */ defineComponent({
1437
1456
  ])] });
1438
1457
  };
1439
1458
  const renderTable = (content) => {
1440
- var _props$scroll15;
1441
- const style = ((_props$scroll15 = props.scroll) === null || _props$scroll15 === void 0 ? void 0 : _props$scroll15.maxHeight) ? { maxHeight: props.scroll.maxHeight } : void 0;
1459
+ var _props$scroll16;
1460
+ const style = ((_props$scroll16 = props.scroll) === null || _props$scroll16 === void 0 ? void 0 : _props$scroll16.maxHeight) ? { maxHeight: props.scroll.maxHeight } : void 0;
1442
1461
  const Component = displayScrollbar.value && !splitTable.value ? Scrollbar : "div";
1443
1462
  const _scrollbarProps$value2 = scrollbarProps.value, { outerStyle: contentOuterStyle } = _scrollbarProps$value2, contentScrollbarRestProps = _objectWithoutProperties(_scrollbarProps$value2, _excluded3);
1444
1463
  const contentScrollbarOuterStyle = Array.isArray(contentOuterStyle) ? [{ height: "100%" }, ...contentOuterStyle] : contentOuterStyle ? [{ height: "100%" }, contentOuterStyle] : { height: "100%" };
@@ -1475,10 +1494,10 @@ var table_default = /* @__PURE__ */ defineComponent({
1475
1494
  ]);
1476
1495
  };
1477
1496
  const style = computed(() => {
1478
- var _props$scroll16;
1479
- if (isString((_props$scroll16 = props.scroll) === null || _props$scroll16 === void 0 ? void 0 : _props$scroll16.y)) {
1480
- var _props$scroll17;
1481
- return { height: (_props$scroll17 = props.scroll) === null || _props$scroll17 === void 0 ? void 0 : _props$scroll17.y };
1497
+ var _props$scroll17;
1498
+ if (isString((_props$scroll17 = props.scroll) === null || _props$scroll17 === void 0 ? void 0 : _props$scroll17.y)) {
1499
+ var _props$scroll18;
1500
+ return { height: (_props$scroll18 = props.scroll) === null || _props$scroll18 === void 0 ? void 0 : _props$scroll18.y };
1482
1501
  }
1483
1502
  });
1484
1503
  const render = () => {
@@ -1503,7 +1522,11 @@ var table_default = /* @__PURE__ */ defineComponent({
1503
1522
  selfResetFilters: resetFilters,
1504
1523
  selfClearFilters: clearFilters,
1505
1524
  selfResetSorters: resetSorters,
1506
- selfClearSorters: clearSorters
1525
+ selfClearSorters: clearSorters,
1526
+ selfScrollIntoView: (options) => {
1527
+ var _virtualListRef$value;
1528
+ return (_virtualListRef$value = virtualListRef.value) === null || _virtualListRef$value === void 0 ? void 0 : _virtualListRef$value.scrollTo(options);
1529
+ }
1507
1530
  };
1508
1531
  },
1509
1532
  methods: {
@@ -1586,6 +1609,15 @@ var table_default = /* @__PURE__ */ defineComponent({
1586
1609
  */
1587
1610
  clearSorters() {
1588
1611
  return this.selfClearSorters();
1612
+ },
1613
+ /**
1614
+ * @zh 虚拟滚动到指定行
1615
+ * @en Virtual scroll to the specified row
1616
+ * @param {{ index?: number; key?: number | string; align?: 'auto' | 'top' | 'bottom' | 'start' | 'center' | 'end' | 'nearest' }} options
1617
+ * @public
1618
+ */
1619
+ scrollIntoView(options) {
1620
+ return this.selfScrollIntoView(options);
1589
1621
  }
1590
1622
  },
1591
1623
  render() {
@@ -88,9 +88,9 @@ declare const Tabs: {
88
88
  trigger: import("./interface").TabTriggerEvent;
89
89
  position: import("./interface").TabsPosition;
90
90
  direction: "horizontal" | "vertical";
91
- justify: boolean;
92
91
  activeKey: string | number;
93
92
  animation: boolean;
93
+ justify: boolean;
94
94
  destroyOnHide: boolean;
95
95
  defaultActiveKey: string | number;
96
96
  editable: boolean;
@@ -186,9 +186,9 @@ declare const Tabs: {
186
186
  trigger: import("./interface").TabTriggerEvent;
187
187
  position: import("./interface").TabsPosition;
188
188
  direction: "horizontal" | "vertical";
189
- justify: boolean;
190
189
  activeKey: string | number;
191
190
  animation: boolean;
191
+ justify: boolean;
192
192
  destroyOnHide: boolean;
193
193
  defaultActiveKey: string | number;
194
194
  editable: boolean;
@@ -287,9 +287,9 @@ declare const Tabs: {
287
287
  trigger: import("./interface").TabTriggerEvent;
288
288
  position: import("./interface").TabsPosition;
289
289
  direction: "horizontal" | "vertical";
290
- justify: boolean;
291
290
  activeKey: string | number;
292
291
  animation: boolean;
292
+ justify: boolean;
293
293
  destroyOnHide: boolean;
294
294
  defaultActiveKey: string | number;
295
295
  editable: boolean;
package/es/tabs/tabs.d.ts CHANGED
@@ -154,9 +154,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
154
154
  trigger: TabTriggerEvent;
155
155
  position: TabsPosition;
156
156
  direction: "horizontal" | "vertical";
157
- justify: boolean;
158
157
  activeKey: string | number;
159
158
  animation: boolean;
159
+ justify: boolean;
160
160
  destroyOnHide: boolean;
161
161
  defaultActiveKey: string | number;
162
162
  editable: boolean;
package/es/tag/index.d.ts CHANGED
@@ -85,8 +85,6 @@ declare const Tag: {
85
85
  check: (_checked: boolean, _ev: MouseEvent) => any;
86
86
  }, import("vue").PublicProps, {
87
87
  visible: boolean;
88
- nowrap: boolean;
89
- ellipsis: boolean;
90
88
  loading: boolean;
91
89
  bordered: boolean;
92
90
  defaultVisible: boolean;
@@ -94,6 +92,8 @@ declare const Tag: {
94
92
  checkable: boolean;
95
93
  checked: boolean;
96
94
  defaultChecked: boolean;
95
+ nowrap: boolean;
96
+ ellipsis: boolean;
97
97
  ellipsisLineClamp: string | number;
98
98
  ellipsisExpandTrigger: "click";
99
99
  ellipsisTooltip: boolean | import("../index.ts").EllipsisTooltipProps;
@@ -185,8 +185,6 @@ declare const Tag: {
185
185
  onCheck?: ((_checked: boolean, _ev: MouseEvent) => any) | undefined;
186
186
  }>, {}, {}, {}, {}, {
187
187
  visible: boolean;
188
- nowrap: boolean;
189
- ellipsis: boolean;
190
188
  loading: boolean;
191
189
  bordered: boolean;
192
190
  defaultVisible: boolean;
@@ -194,6 +192,8 @@ declare const Tag: {
194
192
  checkable: boolean;
195
193
  checked: boolean;
196
194
  defaultChecked: boolean;
195
+ nowrap: boolean;
196
+ ellipsis: boolean;
197
197
  ellipsisLineClamp: string | number;
198
198
  ellipsisExpandTrigger: "click";
199
199
  ellipsisTooltip: boolean | import("../index.ts").EllipsisTooltipProps;
@@ -287,8 +287,6 @@ declare const Tag: {
287
287
  check: (_checked: boolean, _ev: MouseEvent) => any;
288
288
  }, string, {
289
289
  visible: boolean;
290
- nowrap: boolean;
291
- ellipsis: boolean;
292
290
  loading: boolean;
293
291
  bordered: boolean;
294
292
  defaultVisible: boolean;
@@ -296,6 +294,8 @@ declare const Tag: {
296
294
  checkable: boolean;
297
295
  checked: boolean;
298
296
  defaultChecked: boolean;
297
+ nowrap: boolean;
298
+ ellipsis: boolean;
299
299
  ellipsisLineClamp: string | number;
300
300
  ellipsisExpandTrigger: "click";
301
301
  ellipsisTooltip: boolean | import("../index.ts").EllipsisTooltipProps;
@@ -82,7 +82,7 @@
82
82
  color: var(--sd-color-text-2);
83
83
  }
84
84
  .sd-tag-text {
85
- min-width: 0;
85
+ min-width: 1em;
86
86
  max-width: 100%;
87
87
  }
88
88
  .sd-tag-ellipsis-line-clamp {
@@ -126,7 +126,7 @@ $colors:
126
126
  }
127
127
 
128
128
  &-text {
129
- min-width: 0;
129
+ min-width: 1em;
130
130
  max-width: 100%;
131
131
  }
132
132
 
@@ -166,8 +166,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
166
166
  onCheck?: ((_checked: boolean, _ev: MouseEvent) => any) | undefined;
167
167
  }>, {
168
168
  visible: boolean;
169
- nowrap: boolean;
170
- ellipsis: boolean;
171
169
  loading: boolean;
172
170
  bordered: boolean;
173
171
  defaultVisible: boolean;
@@ -175,6 +173,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
175
173
  checkable: boolean;
176
174
  checked: boolean;
177
175
  defaultChecked: boolean;
176
+ nowrap: boolean;
177
+ ellipsis: boolean;
178
178
  ellipsisLineClamp: string | number;
179
179
  ellipsisExpandTrigger: "click";
180
180
  ellipsisTooltip: boolean | EllipsisTooltipProps;
@@ -137,8 +137,8 @@ declare const Timeline: {
137
137
  default: boolean;
138
138
  };
139
139
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
140
- dot: boolean;
141
140
  loading: boolean;
141
+ dot: boolean;
142
142
  hideIcon: boolean;
143
143
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
144
144
  P: {};
@@ -159,8 +159,8 @@ declare const Timeline: {
159
159
  default: boolean;
160
160
  };
161
161
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
162
- dot: boolean;
163
162
  loading: boolean;
163
+ dot: boolean;
164
164
  hideIcon: boolean;
165
165
  }>;
166
166
  __isFragment?: never;
@@ -178,8 +178,8 @@ declare const Timeline: {
178
178
  default: boolean;
179
179
  };
180
180
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
181
- dot: boolean;
182
181
  loading: boolean;
182
+ dot: boolean;
183
183
  hideIcon: boolean;
184
184
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
185
185
  install: (app: App, options?: SDOptions) => void;
@@ -352,8 +352,8 @@ declare const Timeline: {
352
352
  default: boolean;
353
353
  };
354
354
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
355
- dot: boolean;
356
355
  loading: boolean;
356
+ dot: boolean;
357
357
  hideIcon: boolean;
358
358
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
359
359
  P: {};
@@ -374,8 +374,8 @@ declare const Timeline: {
374
374
  default: boolean;
375
375
  };
376
376
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
377
- dot: boolean;
378
377
  loading: boolean;
378
+ dot: boolean;
379
379
  hideIcon: boolean;
380
380
  }>;
381
381
  __isFragment?: never;
@@ -393,8 +393,8 @@ declare const Timeline: {
393
393
  default: boolean;
394
394
  };
395
395
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
396
- dot: boolean;
397
396
  loading: boolean;
397
+ dot: boolean;
398
398
  hideIcon: boolean;
399
399
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
400
400
  install: (app: App, options?: SDOptions) => void;