@sdata/web-vue 3.3.0 → 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 (97) hide show
  1. package/dist/sd.css +16 -12
  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 +2 -5
  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 +16 -12
  36. package/es/input-tag/style/index.css +2 -5
  37. package/es/input-tag/style/input-tag.scss +1 -3
  38. package/es/link/index.d.ts +6 -6
  39. package/es/link/link.vue.d.ts +2 -2
  40. package/es/list/list-item-meta.vue.d.ts +2 -2
  41. package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +10 -3
  42. package/es/list/style/index.css +5 -0
  43. package/es/list/style/index.d.ts +1 -0
  44. package/es/list/style/index.scss +6 -0
  45. package/es/menu/item.d.ts +1 -1
  46. package/es/modal/index.d.ts +5 -5
  47. package/es/modal/modal.vue.d.ts +2 -2
  48. package/es/progress/line.vue.d.ts +1 -1
  49. package/es/qr-code/index.d.ts +12 -12
  50. package/es/qr-code/qr-code.vue.d.ts +4 -4
  51. package/es/select/index.d.ts +5 -5
  52. package/es/select/select-dropdown.vue.d.ts +1 -1
  53. package/es/select/select.d.ts +2 -2
  54. package/es/select/select.js +4 -2
  55. package/es/select/style/index.d.ts +1 -0
  56. package/es/slider/index.d.ts +3 -3
  57. package/es/slider/slider.vue.d.ts +1 -1
  58. package/es/spin/index.d.ts +3 -3
  59. package/es/spin/spin.d.ts +1 -1
  60. package/es/statistic/index.d.ts +3 -3
  61. package/es/statistic/statistic.vue.d.ts +1 -1
  62. package/es/table/index.d.ts +13 -7
  63. package/es/table/style/index.css +4 -1
  64. package/es/table/style/index.scss +6 -1
  65. package/es/table/table-column.d.ts +1 -1
  66. package/es/table/table-td.d.ts +1 -1
  67. package/es/table/table.d.ts +3 -1
  68. package/es/table/table.js +66 -34
  69. package/es/tabs/index.d.ts +3 -3
  70. package/es/tabs/tabs.d.ts +1 -1
  71. package/es/tag/index.d.ts +6 -6
  72. package/es/tag/style/index.css +1 -1
  73. package/es/tag/style/index.scss +1 -1
  74. package/es/tag/tag.vue.d.ts +2 -2
  75. package/es/timeline/index.d.ts +6 -6
  76. package/es/timeline/timeline.d.ts +3 -3
  77. package/es/tree/base-node.vue.d.ts +4 -8
  78. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +14 -16
  79. package/es/tree/tree.vue.d.ts +2 -2
  80. package/es/tree-select/tree-select.vue.d.ts +4 -4
  81. package/es/typography/base.d.ts +1 -1
  82. package/es/watermark/index.d.ts +3 -3
  83. package/es/watermark/watermark.d.ts +1 -1
  84. package/json/web-types.json +1 -1
  85. package/package.json +3 -3
  86. package/es/_components/virtual-list/use-virtual-size.js +0 -94
  87. package/es/_components/virtual-list-v2/hooks/use-size.d.ts +0 -17
  88. package/es/_components/virtual-list-v2/hooks/use-size.js +0 -95
  89. package/es/_components/virtual-list-v2/index.d.ts +0 -2
  90. package/es/_components/virtual-list-v2/index.js +0 -5
  91. package/es/_components/virtual-list-v2/interface.d.ts +0 -44
  92. package/es/_components/virtual-list-v2/virtual-list-item.d.ts +0 -22
  93. package/es/_components/virtual-list-v2/virtual-list-item.js +0 -37
  94. package/es/_components/virtual-list-v2/virtual-list.js +0 -47
  95. package/es/_components/virtual-list-v2/virtual-list.vue.d.ts +0 -749
  96. package/es/_components/virtual-list-v2/virtual-list.vue_vue_type_script_lang.js +0 -179
  97. package/es/_virtual/_plugin-vue_export-helper.js +0 -8
@@ -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;
@@ -153,8 +153,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
153
153
  default: boolean;
154
154
  };
155
155
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
156
- dot: boolean;
157
156
  loading: boolean;
157
+ dot: boolean;
158
158
  hideIcon: boolean;
159
159
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
160
160
  P: {};
@@ -175,8 +175,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
175
175
  default: boolean;
176
176
  };
177
177
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
178
- dot: boolean;
179
178
  loading: boolean;
179
+ dot: boolean;
180
180
  hideIcon: boolean;
181
181
  }>;
182
182
  __isFragment?: never;
@@ -194,8 +194,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
194
194
  default: boolean;
195
195
  };
196
196
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
197
- dot: boolean;
198
197
  loading: boolean;
198
+ dot: boolean;
199
199
  hideIcon: boolean;
200
200
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
201
201
  install: (app: import("vue").App, options?: import("../_utils/types.ts").SDOptions) => void;
@@ -6,11 +6,9 @@ declare var __VLS_10: {}, __VLS_13: {}, __VLS_22: {
6
6
  indeterminate: boolean | undefined;
7
7
  expanded: boolean | undefined;
8
8
  isLeaf: boolean;
9
- }, __VLS_45: {
9
+ }, __VLS_39: {
10
10
  title: string | undefined;
11
- }, __VLS_52: {
12
- title: string | undefined;
13
- }, __VLS_54: {
11
+ }, __VLS_47: {
14
12
  loading: boolean | undefined;
15
13
  checked: boolean | undefined;
16
14
  selected: boolean | undefined;
@@ -25,11 +23,9 @@ type __VLS_Slots = {} & {
25
23
  } & {
26
24
  icon?: (props: typeof __VLS_22) => any;
27
25
  } & {
28
- title?: (props: typeof __VLS_45) => any;
29
- } & {
30
- title?: (props: typeof __VLS_52) => any;
26
+ title?: (props: typeof __VLS_39) => any;
31
27
  } & {
32
- 'drag-icon'?: (props: typeof __VLS_54) => any;
28
+ 'drag-icon'?: (props: typeof __VLS_47) => any;
33
29
  };
34
30
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
35
31
  title: {
@@ -9,7 +9,7 @@ import useTreeContext from "./hooks/use-tree-context.js";
9
9
  import useDraggable$1 from "./hooks/use-draggable.js";
10
10
  import useNodeKey from "./hooks/use-node-key.js";
11
11
  import node_switcher_default from "./node-switcher.js";
12
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeProps, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toRefs, unref, withCtx } from "vue";
12
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeProps, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toRefs, unref, useSlots, withCtx } from "vue";
13
13
  import { onLongPress, useSwipe } from "@vueuse/core";
14
14
  //#region components/tree/base-node.vue?vue&type=script&setup=true&lang.ts
15
15
  var _hoisted_1 = ["data-level", "data-key"];
@@ -52,6 +52,7 @@ var base_node_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
52
52
  const key = useNodeKey();
53
53
  const prefixCls = getPrefixCls("tree-node");
54
54
  const treeContext = useTreeContext();
55
+ const slots = useSlots();
55
56
  const node = computed(() => {
56
57
  var _treeContext$key2Tree;
57
58
  return (_treeContext$key2Tree = treeContext.key2TreeNode) === null || _treeContext$key2Tree === void 0 ? void 0 : _treeContext$key2Tree.get(key.value);
@@ -130,12 +131,12 @@ var base_node_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
130
131
  const treeDragIcon = computed(() => treeContext.dragIcon);
131
132
  const treeNodeIcon = computed(() => treeContext.nodeIcon);
132
133
  const shouldRenderEllipsis = computed(() => {
133
- var _treeContext$treeProp3, _treeContext$treeProp4;
134
- return ((_treeContext$treeProp3 = treeContext.treeProps) === null || _treeContext$treeProp3 === void 0 ? void 0 : _treeContext$treeProp3.ellipsis) === true || ((_treeContext$treeProp4 = treeContext.treeProps) === null || _treeContext$treeProp4 === void 0 ? void 0 : _treeContext$treeProp4.ellipsis) === "performant-ellipsis";
134
+ var _treeContext$treeProp3, _treeContext$treeProp4, _treeContext$treeProp5;
135
+ return !treeContext.nodeTitle && !slots.title && (((_treeContext$treeProp3 = treeContext.treeProps) === null || _treeContext$treeProp3 === void 0 ? void 0 : _treeContext$treeProp3.ellipsis) === true || ((_treeContext$treeProp4 = treeContext.treeProps) === null || _treeContext$treeProp4 === void 0 ? void 0 : _treeContext$treeProp4.ellipsis) === "performant-ellipsis" || Boolean((_treeContext$treeProp5 = treeContext.treeProps) === null || _treeContext$treeProp5 === void 0 ? void 0 : _treeContext$treeProp5.virtualListProps));
135
136
  });
136
137
  const ellipsisComponent = computed(() => {
137
- var _treeContext$treeProp5;
138
- return ((_treeContext$treeProp5 = treeContext.treeProps) === null || _treeContext$treeProp5 === void 0 ? void 0 : _treeContext$treeProp5.ellipsis) === "performant-ellipsis" ? PerformantEllipsis : Ellipsis;
138
+ var _treeContext$treeProp6, _treeContext$treeProp7;
139
+ return ((_treeContext$treeProp6 = treeContext.treeProps) === null || _treeContext$treeProp6 === void 0 ? void 0 : _treeContext$treeProp6.ellipsis) === true && !((_treeContext$treeProp7 = treeContext.treeProps) === null || _treeContext$treeProp7 === void 0 ? void 0 : _treeContext$treeProp7.virtualListProps) ? Ellipsis : PerformantEllipsis;
139
140
  });
140
141
  const titleTextClassNames = computed(() => [`${prefixCls}-title-text`, { [`${prefixCls}-title-text-ellipsis`]: shouldRenderEllipsis.value }]);
141
142
  function onSwitcherClick(e) {
@@ -312,20 +313,17 @@ var base_node_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
312
313
  }, [_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", normalizeProps(mergeProps({ key: 0 }, nodeStatus))) : __props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), normalizeProps(mergeProps({ key: 1 }, nodeStatus)), null, 16)) : treeNodeIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(treeNodeIcon.value), mergeProps({
313
314
  key: 2,
314
315
  node: treeNodeData.value
315
- }, nodeStatus), null, 16, ["node"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), createElementVNode("span", { class: normalizeClass(titleTextClassNames.value) }, [shouldRenderEllipsis.value ? (openBlock(), createBlock(resolveDynamicComponent(ellipsisComponent.value), {
316
- key: 0,
317
- class: normalizeClass(`${unref(prefixCls)}-title-ellipsis`)
318
- }, {
319
- default: withCtx(() => [treeTitle.value ? (openBlock(), createBlock(resolveDynamicComponent(treeTitle.value), { key: 0 })) : renderSlot(_ctx.$slots, "title", {
320
- key: 1,
321
- title: __props.title
322
- }, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
323
- _: 3
324
- }, 8, ["class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [treeTitle.value ? (openBlock(), createBlock(resolveDynamicComponent(treeTitle.value), { key: 0 })) : renderSlot(_ctx.$slots, "title", {
316
+ }, nodeStatus), null, 16, ["node"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), createElementVNode("span", { class: normalizeClass(titleTextClassNames.value) }, [treeTitle.value ? (openBlock(), createBlock(resolveDynamicComponent(treeTitle.value), { key: 0 })) : _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", {
325
317
  key: 1,
326
318
  title: __props.title
327
- }, () => [createTextVNode(toDisplayString(__props.title), 1)])], 64)), unref(draggable) ? (openBlock(), createElementBlock("span", {
319
+ }, () => [createTextVNode(toDisplayString(__props.title), 1)]) : shouldRenderEllipsis.value ? (openBlock(), createBlock(resolveDynamicComponent(ellipsisComponent.value), {
328
320
  key: 2,
321
+ class: normalizeClass(`${unref(prefixCls)}-title-ellipsis`)
322
+ }, {
323
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
324
+ _: 1
325
+ }, 8, ["class"])) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(__props.title), 1)], 64)), unref(draggable) ? (openBlock(), createElementBlock("span", {
326
+ key: 4,
329
327
  class: normalizeClass([`${unref(prefixCls)}-icon`, `${unref(prefixCls)}-drag-icon`])
330
328
  }, [_ctx.$slots["drag-icon"] ? renderSlot(_ctx.$slots, "drag-icon", normalizeProps(mergeProps({ key: 0 }, nodeStatus))) : __props.dragIcon ? (openBlock(), createBlock(resolveDynamicComponent(__props.dragIcon), normalizeProps(mergeProps({ key: 1 }, nodeStatus)), null, 16)) : treeDragIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(treeDragIcon.value), mergeProps({
331
329
  key: 2,
@@ -396,12 +396,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
396
396
  }>, {
397
397
  size: "small" | "mini" | "medium" | "large";
398
398
  data: TreeNodeData[];
399
- ellipsis: TreeEllipsis;
400
399
  multiple: boolean;
401
400
  checkable: boolean | ((node: TreeNodeData, info: {
402
401
  level: number;
403
402
  isLeaf: boolean;
404
403
  }) => boolean);
404
+ ellipsis: TreeEllipsis;
405
405
  checkStrictly: boolean;
406
406
  animation: boolean;
407
407
  draggable: boolean;
@@ -414,7 +414,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
414
414
  searchValue: string;
415
415
  onlyCheckLeaf: boolean;
416
416
  defaultExpandAll: boolean;
417
- checkedStrategy: "all" | "parent" | "child";
417
+ checkedStrategy: "parent" | "all" | "child";
418
418
  defaultExpandSelected: boolean;
419
419
  defaultExpandChecked: boolean;
420
420
  autoExpandParent: boolean;
@@ -390,14 +390,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
390
390
  showArrow: boolean;
391
391
  show: boolean;
392
392
  scrollbar: boolean | ScrollbarProps;
393
- separator: string;
394
- border: boolean;
395
- multiple: boolean;
396
393
  allowClear: boolean;
397
394
  loading: boolean;
395
+ multiple: boolean;
398
396
  showHeaderOnEmpty: boolean;
399
397
  showFooterOnEmpty: boolean;
400
398
  checkable: boolean;
399
+ separator: string;
401
400
  showPath: boolean;
402
401
  defaultInputValue: string;
403
402
  allowSearch: boolean | {
@@ -406,6 +405,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
406
405
  defaultShow: boolean;
407
406
  filterable: boolean;
408
407
  clearable: boolean;
408
+ border: boolean;
409
409
  fallbackOption: boolean | ((key: number | string) => TreeNodeData | boolean);
410
410
  selectable: boolean | "leaf" | ((node: TreeNodeData, info: {
411
411
  isLeaf: boolean;
@@ -415,7 +415,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
415
415
  treeCheckable: boolean;
416
416
  treeCheckStrictly: boolean;
417
417
  labelInValue: boolean;
418
- treeCheckedStrategy: "all" | "parent" | "child";
418
+ treeCheckedStrategy: "parent" | "all" | "child";
419
419
  virtualScroll: boolean;
420
420
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
421
421
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -160,8 +160,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
160
160
  color: string;
161
161
  };
162
162
  disabled: boolean;
163
- underline: boolean;
164
163
  ellipsis: boolean | EllipsisConfig;
164
+ underline: boolean;
165
165
  editable: boolean;
166
166
  copyable: boolean;
167
167
  editing: boolean;
@@ -55,10 +55,10 @@ declare const Watermark: {
55
55
  };
56
56
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
57
57
  repeat: boolean;
58
- alpha: number;
59
58
  rotate: number;
60
59
  zIndex: number;
61
60
  gap: [number, number];
61
+ alpha: number;
62
62
  antiTamper: boolean;
63
63
  grayscale: boolean;
64
64
  staggered: boolean;
@@ -122,10 +122,10 @@ declare const Watermark: {
122
122
  };
123
123
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
124
124
  repeat: boolean;
125
- alpha: number;
126
125
  rotate: number;
127
126
  zIndex: number;
128
127
  gap: [number, number];
128
+ alpha: number;
129
129
  antiTamper: boolean;
130
130
  grayscale: boolean;
131
131
  staggered: boolean;
@@ -186,10 +186,10 @@ declare const Watermark: {
186
186
  };
187
187
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
188
188
  repeat: boolean;
189
- alpha: number;
190
189
  rotate: number;
191
190
  zIndex: number;
192
191
  gap: [number, number];
192
+ alpha: number;
193
193
  antiTamper: boolean;
194
194
  grayscale: boolean;
195
195
  staggered: boolean;
@@ -104,10 +104,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
104
104
  };
105
105
  }>> & Readonly<{}>, {
106
106
  repeat: boolean;
107
- alpha: number;
108
107
  rotate: number;
109
108
  zIndex: number;
110
109
  gap: [number, number];
110
+ alpha: number;
111
111
  antiTamper: boolean;
112
112
  grayscale: boolean;
113
113
  staggered: boolean;
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "@sdata/web-vue",
5
- "version": "3.2.1",
5
+ "version": "3.3.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdata/web-vue",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "SD Design Vue: A Vue.js 3 UI Library",
5
5
  "keywords": [
6
6
  "sd",
@@ -67,8 +67,8 @@
67
67
  "qrcode": "^1.5.4",
68
68
  "resize-observer-polyfill": "^1.5.1",
69
69
  "scroll-into-view-if-needed": "^3.1.0",
70
- "vue": "^3.5.38",
71
- "vue-virtual-scroller": "^3.0.4"
70
+ "virtua": "^0.49.2",
71
+ "vue": "^3.5.38"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@babel/types": "^7.29.7",
@@ -1,94 +0,0 @@
1
- import { computed, onMounted, ref } from "vue";
2
- //#region components/_components/virtual-list/use-virtual-size.ts
3
- var useVirtualSize = ({ dataKeys, fixedSize, estimatedSize, overscan, visibleCount }) => {
4
- const firstRangeAverageSize = ref(0);
5
- const sizeMap = /* @__PURE__ */ new Map();
6
- const fallbackEstimatedSize = computed(() => {
7
- var _estimatedSize$value;
8
- return (_estimatedSize$value = estimatedSize.value) !== null && _estimatedSize$value !== void 0 ? _estimatedSize$value : 30;
9
- });
10
- const total = computed(() => dataKeys.value.length);
11
- const start = ref(0);
12
- const range = computed(() => {
13
- return Math.max(visibleCount.value + overscan.value * 2, 1);
14
- });
15
- const end = computed(() => {
16
- const nextEnd = start.value + range.value;
17
- if (nextEnd > total.value) return total.value;
18
- return nextEnd;
19
- });
20
- const maxStart = computed(() => {
21
- const max = total.value - range.value;
22
- if (max < 0) return 0;
23
- return max;
24
- });
25
- const setStart = (index) => {
26
- if (index < 0) start.value = 0;
27
- else if (index > maxStart.value) start.value = maxStart.value;
28
- else start.value = index;
29
- };
30
- const isFixed = ref(fixedSize.value);
31
- const resolvedEstimatedSize = computed(() => {
32
- if (fallbackEstimatedSize.value !== 30) return fallbackEstimatedSize.value;
33
- return firstRangeAverageSize.value || fallbackEstimatedSize.value;
34
- });
35
- const setItemSize = (key, size) => {
36
- sizeMap.set(key, size);
37
- };
38
- const getItemSize = (index) => {
39
- var _sizeMap$get;
40
- if (isFixed.value) return resolvedEstimatedSize.value;
41
- const key = dataKeys.value[index];
42
- if (key === void 0) return resolvedEstimatedSize.value;
43
- return (_sizeMap$get = sizeMap.get(key)) !== null && _sizeMap$get !== void 0 ? _sizeMap$get : resolvedEstimatedSize.value;
44
- };
45
- const hasItemSize = (key) => {
46
- return sizeMap.has(key);
47
- };
48
- onMounted(() => {
49
- const firstRangeTotalSize = Array.from(sizeMap.values()).reduce((sum, value) => sum + value, 0);
50
- if (firstRangeTotalSize > 0) firstRangeAverageSize.value = firstRangeTotalSize / sizeMap.size;
51
- });
52
- const getOffset = (startIndex, endIndex) => {
53
- let offset = 0;
54
- for (let index = startIndex; index < endIndex; index++) offset += getItemSize(index);
55
- return offset;
56
- };
57
- const getScrollOffset = (index) => {
58
- if (isFixed.value) return resolvedEstimatedSize.value * index;
59
- return getOffset(0, index);
60
- };
61
- const frontPadding = computed(() => {
62
- if (isFixed.value) return resolvedEstimatedSize.value * start.value;
63
- return getOffset(0, start.value);
64
- });
65
- const getStartByScroll = (scrollOffset) => {
66
- let offset = scrollOffset;
67
- let anchorIndex = 0;
68
- while (offset > 0 && anchorIndex < total.value) {
69
- offset -= getItemSize(anchorIndex);
70
- anchorIndex += 1;
71
- }
72
- const nextStart = anchorIndex - overscan.value;
73
- if (nextStart < 0) return 0;
74
- if (nextStart > maxStart.value) return maxStart.value;
75
- return nextStart;
76
- };
77
- return {
78
- frontPadding,
79
- behindPadding: computed(() => {
80
- if (isFixed.value) return resolvedEstimatedSize.value * (total.value - end.value);
81
- return getOffset(end.value, total.value);
82
- }),
83
- start,
84
- end,
85
- getStartByScroll,
86
- setItemSize,
87
- hasItemSize,
88
- setStart,
89
- getScrollOffset,
90
- getItemSize
91
- };
92
- };
93
- //#endregion
94
- export { useVirtualSize };
@@ -1,17 +0,0 @@
1
- import { Ref } from 'vue';
2
- export declare const useSize: ({ dataKeys, fixedSize, estimatedSize, buffer, }: {
3
- dataKeys: Ref<(string | number)[]>;
4
- fixedSize: Ref<boolean>;
5
- estimatedSize: Ref<number | undefined>;
6
- buffer: Ref<number>;
7
- }) => {
8
- frontPadding: import("vue").ComputedRef<number>;
9
- behindPadding: import("vue").ComputedRef<number>;
10
- start: Ref<number, number>;
11
- end: import("vue").ComputedRef<number>;
12
- getStartByScroll: (scrollOffset: number) => number;
13
- setItemSize: (key: string | number, size: number) => void;
14
- hasItemSize: (key: string | number) => boolean;
15
- setStart: (index: number) => void;
16
- getScrollOffset: (index: number) => number;
17
- };
@@ -1,95 +0,0 @@
1
- import { computed, onMounted, ref } from "vue";
2
- //#region components/_components/virtual-list-v2/hooks/use-size.ts
3
- var useSize = ({ dataKeys, fixedSize, estimatedSize, buffer }) => {
4
- const firstRangeAverageSize = ref(0);
5
- const sizeMap = /* @__PURE__ */ new Map();
6
- const total = computed(() => dataKeys.value.length);
7
- const start = ref(0);
8
- const end = computed(() => {
9
- const _end = start.value + buffer.value * 3;
10
- if (_end > total.value) return total.value;
11
- return _end;
12
- });
13
- const maxStart = computed(() => {
14
- const max = total.value - buffer.value * 3;
15
- if (max < 0) return 0;
16
- return max;
17
- });
18
- const setStart = (index) => {
19
- if (index < 0) start.value = 0;
20
- else if (index > maxStart.value) start.value = maxStart.value;
21
- else start.value = index;
22
- };
23
- const isFixed = ref(fixedSize.value);
24
- const _estimatedSize = computed(() => {
25
- var _estimatedSize$value;
26
- const nextEstimatedSize = (_estimatedSize$value = estimatedSize.value) !== null && _estimatedSize$value !== void 0 ? _estimatedSize$value : 30;
27
- if (nextEstimatedSize !== 30) return nextEstimatedSize;
28
- return firstRangeAverageSize.value || nextEstimatedSize;
29
- });
30
- const setItemSize = (key, size) => {
31
- sizeMap.set(key, size);
32
- };
33
- const getItemSize = (index) => {
34
- var _sizeMap$get;
35
- if (isFixed.value) return _estimatedSize.value;
36
- const _key = dataKeys.value[index];
37
- if (_key === void 0) return _estimatedSize.value;
38
- return (_sizeMap$get = sizeMap.get(_key)) !== null && _sizeMap$get !== void 0 ? _sizeMap$get : _estimatedSize.value;
39
- };
40
- const hasItemSize = (key) => {
41
- return sizeMap.has(key);
42
- };
43
- onMounted(() => {
44
- const firstRangeTotalSize = Array.from(sizeMap.values()).reduce((pre, value) => pre + value, 0);
45
- if (firstRangeTotalSize > 0) firstRangeAverageSize.value = firstRangeTotalSize / sizeMap.size;
46
- });
47
- const getScrollOffset = (index) => {
48
- if (isFixed.value) return _estimatedSize.value * index;
49
- return getOffset(0, index);
50
- };
51
- const getOffset = (start, end) => {
52
- let offset = 0;
53
- for (let i = start; i < end; i++) offset += getItemSize(i);
54
- return offset;
55
- };
56
- const frontPadding = computed(() => {
57
- if (isFixed.value) return _estimatedSize.value * start.value;
58
- return getOffset(0, start.value);
59
- });
60
- const getOffsetIndex = (scrollOffset) => {
61
- const isForward = scrollOffset >= frontPadding.value;
62
- let offset = Math.abs(scrollOffset - frontPadding.value);
63
- const _start = isForward ? start.value : start.value - 1;
64
- let offsetIndex = 0;
65
- while (offset > 0) {
66
- const itemSize = getItemSize(_start + offsetIndex);
67
- offset -= itemSize;
68
- isForward ? offsetIndex++ : offsetIndex--;
69
- }
70
- return offsetIndex;
71
- };
72
- const getStartByScroll = (scrollOffset) => {
73
- const offsetIndex = getOffsetIndex(scrollOffset);
74
- const _start = start.value + offsetIndex - buffer.value;
75
- if (_start < 0) return 0;
76
- if (_start > maxStart.value) return maxStart.value;
77
- return _start;
78
- };
79
- return {
80
- frontPadding,
81
- behindPadding: computed(() => {
82
- if (isFixed.value) return _estimatedSize.value * (total.value - end.value);
83
- return getOffset(end.value, total.value);
84
- }),
85
- start,
86
- end,
87
- getStartByScroll,
88
- setItemSize,
89
- hasItemSize,
90
- setStart,
91
- getScrollOffset
92
- };
93
- };
94
- //#endregion
95
- export { useSize };
@@ -1,2 +0,0 @@
1
- import VirtualList from './virtual-list.vue';
2
- export default VirtualList;
@@ -1,5 +0,0 @@
1
- import virtual_list_default from "./virtual-list.js";
2
- //#region components/_components/virtual-list-v2/index.ts
3
- var virtual_list_v2_default = virtual_list_default;
4
- //#endregion
5
- export { virtual_list_v2_default as default };
@@ -1,44 +0,0 @@
1
- import { VNode } from 'vue';
2
- import type { ScrollbarProps } from '../../scrollbar';
3
- export type VirtualItemKey = string | number;
4
- export interface InternalDataItem {
5
- key: VirtualItemKey;
6
- index: number;
7
- item: unknown;
8
- }
9
- export type ItemSlot = (props: {
10
- item: unknown;
11
- index: number;
12
- }) => VNode[];
13
- export interface ScrollIntoViewOptions {
14
- index?: number;
15
- key?: VirtualItemKey;
16
- align: 'auto' | 'top' | 'bottom';
17
- }
18
- export interface VirtualListProps {
19
- height?: number | string;
20
- threshold?: number;
21
- isStaticItemHeight?: boolean;
22
- fixedSize?: boolean;
23
- estimatedSize?: number;
24
- buffer?: number;
25
- data?: unknown[];
26
- itemKey?: string | ((item: unknown) => VirtualItemKey);
27
- component?: keyof HTMLElementTagNameMap | {
28
- container?: keyof HTMLElementTagNameMap;
29
- list?: keyof HTMLElementTagNameMap;
30
- content?: keyof HTMLElementTagNameMap;
31
- };
32
- listAttrs?: Record<string, unknown>;
33
- contentAttrs?: Record<string, unknown>;
34
- paddingPosition?: 'content' | 'list';
35
- scrollbar?: boolean | ScrollbarProps;
36
- }
37
- export type ScrollOptions = number | {
38
- index?: number;
39
- key?: VirtualItemKey;
40
- align?: 'auto' | 'top' | 'bottom';
41
- };
42
- export interface VirtualListRef {
43
- scrollTo: (options: ScrollOptions) => void;
44
- }
@@ -1,22 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- hasItemSize: {
3
- type: FunctionConstructor;
4
- required: true;
5
- };
6
- setItemSize: {
7
- type: FunctionConstructor;
8
- required: true;
9
- };
10
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
11
- [key: string]: any;
12
- }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
- hasItemSize: {
14
- type: FunctionConstructor;
15
- required: true;
16
- };
17
- setItemSize: {
18
- type: FunctionConstructor;
19
- required: true;
20
- };
21
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
- export default _default;