@sdata/web-vue 3.18.0 → 3.20.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 (280) hide show
  1. package/dist/sd.css +489 -0
  2. package/dist/sd.min.css +2 -2
  3. package/es/_components/icon-hover.vue.d.ts +1 -1
  4. package/es/_components/input-label/input-label.d.ts +13 -1
  5. package/es/_components/input-label/input-label.js +35 -5
  6. package/es/_components/input-label/style/index.css +6 -0
  7. package/es/_components/input-label/style/input-label.scss +8 -0
  8. package/es/_components/picker/input-range.vue.d.ts +24 -1
  9. package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +42 -6
  10. package/es/_components/picker/input.vue.d.ts +24 -1
  11. package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +31 -4
  12. package/es/_components/picker/style/index.scss +8 -0
  13. package/es/_components/select-view/select-view.d.ts +15 -3
  14. package/es/_components/select-view/select-view.js +10 -1
  15. package/es/_components/select-view/style/index.css +12 -0
  16. package/es/_components/virtual-list/virtual-list.vue.d.ts +6 -6
  17. package/es/_hooks/use-fit-width.d.ts +22 -0
  18. package/es/_hooks/use-fit-width.js +76 -0
  19. package/es/_hooks/use-form-item.d.ts +1 -1
  20. package/es/_hooks/use-size.d.ts +1 -1
  21. package/es/anchor/anchor.vue.d.ts +1 -1
  22. package/es/anchor/index.d.ts +3 -3
  23. package/es/auto-complete/auto-complete.d.ts +20 -2
  24. package/es/auto-complete/auto-complete.js +18 -0
  25. package/es/auto-complete/index.d.ts +36 -6
  26. package/es/basic-crud-table/basic-crud-table.vue.d.ts +2 -2
  27. package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +6 -4
  28. package/es/basic-crud-table/index.d.ts +5 -5
  29. package/es/basic-crud-table/types.d.ts +2 -0
  30. package/es/button/button.vue.d.ts +2 -2
  31. package/es/button/index.d.ts +6 -6
  32. package/es/card/card.d.ts +25 -3
  33. package/es/card/card.js +11 -2
  34. package/es/card/index.d.ts +45 -6
  35. package/es/carousel/carousel-indicator.vue.d.ts +1 -1
  36. package/es/cascader/base-cascader-panel.d.ts +4 -1
  37. package/es/cascader/base-cascader-panel.js +2 -1
  38. package/es/cascader/cascader-option.d.ts +1 -1
  39. package/es/cascader/cascader-panel.vue.d.ts +1 -1
  40. package/es/cascader/cascader-search-panel.d.ts +4 -1
  41. package/es/cascader/cascader-search-panel.js +2 -1
  42. package/es/cascader/cascader.vue.d.ts +7 -5
  43. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +22 -2
  44. package/es/cascader/types.d.ts +4 -1
  45. package/es/checkbox/checkbox.d.ts +3 -3
  46. package/es/checkbox/index.d.ts +6 -6
  47. package/es/collapse/collapse-item.d.ts +3 -3
  48. package/es/collapse/index.d.ts +3 -3
  49. package/es/color-picker/color-picker.d.ts +2 -2
  50. package/es/color-picker/index.d.ts +6 -6
  51. package/es/components.d.ts +4 -0
  52. package/es/config-provider/config-provider.vue.d.ts +68 -1
  53. package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +67 -1
  54. package/es/config-provider/context.d.ts +12 -0
  55. package/es/config-provider/index.d.ts +102 -3
  56. package/es/date-picker/index.d.ts +87 -23
  57. package/es/date-picker/interface.d.ts +2 -1
  58. package/es/date-picker/picker-panel.vue.d.ts +1 -1
  59. package/es/date-picker/picker.vue.d.ts +39 -17
  60. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +30 -1
  61. package/es/date-picker/pickers/date-picker.d.ts +18 -0
  62. package/es/date-picker/pickers/date-picker.js +16 -0
  63. package/es/date-picker/range-picker-panel.vue.d.ts +1 -1
  64. package/es/date-picker/range-picker.vue.d.ts +39 -17
  65. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +27 -1
  66. package/es/date-picker/style/index.css +6 -0
  67. package/es/descriptions/descriptions.d.ts +3 -3
  68. package/es/descriptions/index.d.ts +9 -9
  69. package/es/divider/divider.d.ts +1 -1
  70. package/es/divider/index.d.ts +3 -3
  71. package/es/drawer/drawer.vue.d.ts +4 -4
  72. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +1 -1
  73. package/es/drawer/index.d.ts +11 -11
  74. package/es/dropdown/dropdown-button.vue.d.ts +2 -2
  75. package/es/dropdown/dropdown-option.vue.d.ts +1 -1
  76. package/es/dropdown/dropdown-submenu.vue.d.ts +2 -2
  77. package/es/dropdown/dropdown.vue.d.ts +1 -1
  78. package/es/dropdown/index.d.ts +21 -21
  79. package/es/ellipsis/ellipsis.vue.d.ts +1 -1
  80. package/es/ellipsis/index.d.ts +6 -6
  81. package/es/ellipsis/performant-ellipsis.vue.d.ts +1 -1
  82. package/es/form/form-item.vue.d.ts +1 -1
  83. package/es/form/form.vue.d.ts +1 -1
  84. package/es/form/index.d.ts +9 -9
  85. package/es/grid/grid-row.vue.d.ts +3 -3
  86. package/es/grid/index.d.ts +9 -9
  87. package/es/icon/icon-arrow-up/icon-arrow-up.js +5 -0
  88. package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +52 -0
  89. package/es/icon/icon-arrow-up/index.js +9 -0
  90. package/es/icon/icon-mute/icon-mute.js +5 -0
  91. package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +52 -0
  92. package/es/icon/icon-mute/index.js +9 -0
  93. package/es/icon/icon-voice/icon-voice.js +5 -0
  94. package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +52 -0
  95. package/es/icon/icon-voice/index.js +9 -0
  96. package/es/image/preview-action.d.ts +6 -6
  97. package/es/image/preview-group.vue.d.ts +1 -1
  98. package/es/index.css +489 -0
  99. package/es/index.d.ts +6 -1
  100. package/es/index.js +5 -1
  101. package/es/index.scss +2 -0
  102. package/es/input/index.d.ts +99 -6
  103. package/es/input/input-password.vue.d.ts +18 -0
  104. package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +24 -2
  105. package/es/input/input-search.d.ts +18 -0
  106. package/es/input/input-search.js +20 -2
  107. package/es/input/input.d.ts +29 -2
  108. package/es/input/input.js +45 -3
  109. package/es/input/style/index.css +16 -0
  110. package/es/input/style/index.scss +21 -0
  111. package/es/input-number/index.d.ts +36 -6
  112. package/es/input-number/input-number.d.ts +20 -2
  113. package/es/input-number/input-number.js +19 -0
  114. package/es/input-tag/index.d.ts +36 -6
  115. package/es/input-tag/input-tag.d.ts +20 -2
  116. package/es/input-tag/input-tag.js +35 -4
  117. package/es/input-tag/style/index.css +6 -0
  118. package/es/input-tag/style/input-tag.scss +8 -0
  119. package/es/kv-list/index.d.ts +72 -32
  120. package/es/link/index.d.ts +6 -6
  121. package/es/link/link.vue.d.ts +2 -2
  122. package/es/list/index.d.ts +9 -0
  123. package/es/list/list.d.ts +7 -0
  124. package/es/list/list.js +8 -2
  125. package/es/locale/interface.d.ts +22 -0
  126. package/es/locale/lang/ar-eg.js +21 -1
  127. package/es/locale/lang/de-de.js +21 -1
  128. package/es/locale/lang/en-us.js +21 -1
  129. package/es/locale/lang/es-es.js +21 -1
  130. package/es/locale/lang/fr-fr.js +21 -1
  131. package/es/locale/lang/id-id.js +21 -1
  132. package/es/locale/lang/it-it.js +21 -1
  133. package/es/locale/lang/ja-jp.js +21 -1
  134. package/es/locale/lang/km-kh.js +21 -1
  135. package/es/locale/lang/ko-kr.js +21 -1
  136. package/es/locale/lang/ms-my.js +21 -1
  137. package/es/locale/lang/nl-nl.js +21 -1
  138. package/es/locale/lang/pt-pt.js +21 -1
  139. package/es/locale/lang/ru-ru.js +21 -1
  140. package/es/locale/lang/th-th.js +21 -1
  141. package/es/locale/lang/vi-vn.js +21 -1
  142. package/es/locale/lang/zh-cn.js +21 -1
  143. package/es/locale/lang/zh-tw.js +21 -1
  144. package/es/mention/index.d.ts +39 -9
  145. package/es/mention/mention.d.ts +21 -3
  146. package/es/mention/mention.js +24 -1
  147. package/es/mention/style/index.css +6 -0
  148. package/es/mention/style/index.scss +8 -0
  149. package/es/menu/item.d.ts +1 -1
  150. package/es/message/message-list.d.ts +1 -1
  151. package/es/modal/index.d.ts +9 -9
  152. package/es/modal/modal.vue.d.ts +3 -3
  153. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +1 -1
  154. package/es/popconfirm/index.d.ts +3 -3
  155. package/es/popconfirm/popconfirm.vue.d.ts +1 -1
  156. package/es/popover/index.d.ts +6 -6
  157. package/es/popover/popover.vue.d.ts +2 -2
  158. package/es/progress/circle.vue.d.ts +1 -1
  159. package/es/progress/line.vue.d.ts +1 -1
  160. package/es/qr-code/index.d.ts +27 -21
  161. package/es/qr-code/qr-code.vue.d.ts +8 -6
  162. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +5 -2
  163. package/es/radio/index.d.ts +6 -6
  164. package/es/radio/radio.d.ts +3 -3
  165. package/es/rate/index.d.ts +3 -3
  166. package/es/rate/rate.d.ts +1 -1
  167. package/es/resize-box/index.d.ts +5 -5
  168. package/es/resize-box/resize-box.vue.d.ts +3 -3
  169. package/es/rich-text-editor/built-in-components.d.ts +5 -0
  170. package/es/rich-text-editor/built-in-components.js +6 -0
  171. package/es/rich-text-editor/index.d.ts +195 -0
  172. package/es/rich-text-editor/index.js +12 -0
  173. package/es/rich-text-editor/nodes/inline-component-node.d.ts +30 -0
  174. package/es/rich-text-editor/nodes/inline-component-node.js +86 -0
  175. package/es/rich-text-editor/rich-text-editor.js +5 -0
  176. package/es/rich-text-editor/rich-text-editor.vue.d.ts +76 -0
  177. package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +630 -0
  178. package/es/rich-text-editor/rich-text-node-renderer.js +5 -0
  179. package/es/rich-text-editor/rich-text-node-renderer.vue.d.ts +28 -0
  180. package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +133 -0
  181. package/es/rich-text-editor/style/css.js +2 -0
  182. package/es/rich-text-editor/style/index.css +164 -0
  183. package/es/rich-text-editor/style/index.d.ts +2 -0
  184. package/es/rich-text-editor/style/index.js +2 -0
  185. package/es/rich-text-editor/style/index.scss +193 -0
  186. package/es/rich-text-editor/style/token.scss +36 -0
  187. package/es/rich-text-editor/types.d.ts +148 -0
  188. package/es/sd-vue.js +6 -0
  189. package/es/select/index.d.ts +117 -54
  190. package/es/select/interface.d.ts +2 -1
  191. package/es/select/select-dropdown.vue.d.ts +3 -0
  192. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +2 -4
  193. package/es/select/select.d.ts +62 -25
  194. package/es/select/select.js +28 -1
  195. package/es/sender/context.d.ts +8 -0
  196. package/es/sender/context.js +4 -0
  197. package/es/sender/index.d.ts +119 -0
  198. package/es/sender/index.js +20 -0
  199. package/es/sender/sender-header.js +5 -0
  200. package/es/sender/sender-header.vue.d.ts +28 -0
  201. package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +127 -0
  202. package/es/sender/sender-switch.js +5 -0
  203. package/es/sender/sender-switch.vue.d.ts +32 -0
  204. package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +95 -0
  205. package/es/sender/sender.js +5 -0
  206. package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +895 -0
  207. package/es/sender/style/css.js +3 -0
  208. package/es/sender/style/index.css +301 -0
  209. package/es/sender/style/index.d.ts +3 -0
  210. package/es/sender/style/index.js +3 -0
  211. package/es/sender/style/index.scss +359 -0
  212. package/es/sender/style/token.scss +43 -0
  213. package/es/sender/types.d.ts +228 -0
  214. package/es/sender/use-speech.d.ts +19 -0
  215. package/es/sender/use-speech.js +338 -0
  216. package/es/slider/index.d.ts +3 -3
  217. package/es/slider/slider-input.vue.d.ts +1 -1
  218. package/es/slider/slider.vue.d.ts +1 -1
  219. package/es/space/index.d.ts +9 -9
  220. package/es/space/space.d.ts +2 -2
  221. package/es/spin/index.d.ts +18 -3
  222. package/es/spin/spin.d.ts +10 -1
  223. package/es/spin/spin.js +72 -10
  224. package/es/statistic/index.d.ts +3 -3
  225. package/es/statistic/statistic.vue.d.ts +1 -1
  226. package/es/steps/index.d.ts +5 -5
  227. package/es/steps/step.vue.d.ts +2 -2
  228. package/es/steps/steps.vue.d.ts +1 -1
  229. package/es/table/index.d.ts +68 -23
  230. package/es/table/interface.d.ts +3 -0
  231. package/es/table/table-column.d.ts +1 -1
  232. package/es/table/table-operation-td.d.ts +12 -12
  233. package/es/table/table-td.d.ts +2 -2
  234. package/es/table/table.d.ts +27 -8
  235. package/es/table/table.js +7 -2
  236. package/es/tabs/index.d.ts +12 -12
  237. package/es/tabs/tabs-nav.d.ts +1 -1
  238. package/es/tabs/tabs.d.ts +4 -4
  239. package/es/tag/index.d.ts +6 -6
  240. package/es/tag/tag.vue.d.ts +2 -2
  241. package/es/textarea/index.d.ts +38 -8
  242. package/es/textarea/style/index.css +6 -0
  243. package/es/textarea/style/index.scss +8 -0
  244. package/es/textarea/textarea.vue.d.ts +21 -3
  245. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +36 -3
  246. package/es/time-picker/index.d.ts +36 -6
  247. package/es/time-picker/interface.d.ts +2 -1
  248. package/es/time-picker/range-panel.js +58 -0
  249. package/es/time-picker/time-picker.vue.d.ts +20 -2
  250. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +30 -1
  251. package/es/timeline/index.d.ts +45 -6
  252. package/es/timeline/timeline.d.ts +25 -3
  253. package/es/timeline/timeline.js +11 -2
  254. package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +9 -5
  255. package/es/toolbar/types.d.ts +2 -0
  256. package/es/tooltip/index.d.ts +6 -6
  257. package/es/tooltip/tooltip.vue.d.ts +2 -2
  258. package/es/tour/index.d.ts +3 -3
  259. package/es/tour/tour.vue.d.ts +1 -1
  260. package/es/transfer/index.d.ts +3 -3
  261. package/es/transfer/transfer.vue.d.ts +1 -1
  262. package/es/tree/tree.vue.d.ts +4 -4
  263. package/es/tree-select/interface.d.ts +2 -1
  264. package/es/tree-select/tree-select.vue.d.ts +32 -7
  265. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +27 -1
  266. package/es/trigger/index.d.ts +12 -12
  267. package/es/trigger/trigger.d.ts +4 -4
  268. package/es/typography/base.d.ts +4 -4
  269. package/es/typography/edit-content.vue.d.ts +2 -2
  270. package/es/upload/index.d.ts +6 -6
  271. package/es/upload/upload-button.d.ts +1 -1
  272. package/es/upload/upload.d.ts +2 -2
  273. package/es/verification-code/index.d.ts +3 -3
  274. package/es/verification-code/verification-code.d.ts +1 -1
  275. package/es/watermark/index.d.ts +3 -3
  276. package/es/watermark/watermark.d.ts +1 -1
  277. package/json/vetur-attributes.json +295 -2
  278. package/json/vetur-tags.json +103 -3
  279. package/json/web-types.json +746 -53
  280. package/package.json +10 -1
@@ -0,0 +1,76 @@
1
+ import { getPrefixCls } from "../_utils/global-config.js";
2
+ import { computed, nextTick, onMounted, onUpdated, ref, toValue, watch } from "vue";
3
+ import { measureNaturalWidth, prepareWithSegments } from "@chenglou/pretext";
4
+ //#region components/_hooks/use-fit-width.ts
5
+ var getFitWidthCssVar = (prefix) => `--${prefix}-fit-width`;
6
+ function getFont(style) {
7
+ if (style.font) return style.font;
8
+ return [
9
+ style.fontStyle,
10
+ style.fontVariant,
11
+ style.fontWeight,
12
+ style.fontStretch,
13
+ style.fontSize,
14
+ style.fontFamily
15
+ ].filter(Boolean).join(" ");
16
+ }
17
+ function useFitWidth(options) {
18
+ const fitWidthCssVar = getFitWidthCssVar(getPrefixCls());
19
+ const fitWidthValue = `var(${fitWidthCssVar})`;
20
+ const measuredWidth = ref(toValue(options.fallbackWidth));
21
+ let measurementKey = "";
22
+ const measure = () => {
23
+ var _options$additionalWi;
24
+ if (!toValue(options.fitWidth)) return;
25
+ const text = toValue(options.text);
26
+ const target = options.target.value;
27
+ if (!text || !target || typeof window === "undefined") {
28
+ measuredWidth.value = toValue(options.fallbackWidth);
29
+ measurementKey = "";
30
+ return;
31
+ }
32
+ const style = window.getComputedStyle(target);
33
+ const font = getFont(style);
34
+ const parsedLetterSpacing = Number.parseFloat(style.letterSpacing);
35
+ const letterSpacing = Number.isFinite(parsedLetterSpacing) ? parsedLetterSpacing : 0;
36
+ const nextMeasurementKey = [
37
+ text,
38
+ font,
39
+ letterSpacing,
40
+ options.whiteSpace,
41
+ options.additionalWidth
42
+ ].join("\0");
43
+ if (nextMeasurementKey === measurementKey) return;
44
+ const prepared = prepareWithSegments(text, font, {
45
+ whiteSpace: options.whiteSpace,
46
+ letterSpacing
47
+ });
48
+ measuredWidth.value = `${measureNaturalWidth(prepared) + ((_options$additionalWi = options.additionalWidth) !== null && _options$additionalWi !== void 0 ? _options$additionalWi : 0)}px`;
49
+ measurementKey = nextMeasurementKey;
50
+ };
51
+ const scheduleMeasure = () => {
52
+ nextTick(measure);
53
+ };
54
+ watch([
55
+ () => toValue(options.fitWidth),
56
+ () => toValue(options.text),
57
+ () => toValue(options.fallbackWidth),
58
+ options.target
59
+ ], scheduleMeasure, { immediate: true });
60
+ onMounted(() => {
61
+ measure();
62
+ if (typeof document !== "undefined" && document.fonts) document.fonts.ready.then(() => {
63
+ measurementKey = "";
64
+ measure();
65
+ });
66
+ });
67
+ onUpdated(measure);
68
+ return {
69
+ fitWidthCssVar,
70
+ fitWidthStyle: computed(() => toValue(options.fitWidth) ? { [fitWidthCssVar]: measuredWidth.value } : {}),
71
+ fitWidthValue,
72
+ measure
73
+ };
74
+ }
75
+ //#endregion
76
+ export { getFitWidthCssVar, useFitWidth };
@@ -8,7 +8,7 @@ export declare const useFormItem: ({ size, disabled, error, uninject, }?: {
8
8
  uninject?: boolean;
9
9
  }) => {
10
10
  formItemCtx: FormItemContext;
11
- mergedSize: import("vue").ComputedRef<"small" | "mini" | "medium" | "large" | undefined>;
11
+ mergedSize: import("vue").ComputedRef<"small" | "medium" | "large" | "mini" | undefined>;
12
12
  mergedDisabled: import("vue").ComputedRef<boolean>;
13
13
  mergedError: import("vue").ComputedRef<boolean>;
14
14
  feedback: Ref<string | undefined, string | undefined>;
@@ -3,5 +3,5 @@ import { Size } from '../_utils/constant';
3
3
  export declare const useSize: (size?: Ref<Size | undefined>, { defaultValue }?: {
4
4
  defaultValue?: Size;
5
5
  }) => {
6
- mergedSize: import("vue").ComputedRef<"small" | "mini" | "medium" | "large">;
6
+ mergedSize: import("vue").ComputedRef<"small" | "medium" | "large" | "mini">;
7
7
  };
@@ -100,8 +100,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
100
100
  onChange?: ((_hash: string) => any) | undefined;
101
101
  onSelect?: ((_hash: string | undefined, _preHash: string) => any) | undefined;
102
102
  }>, {
103
- direction: "horizontal" | "vertical";
104
103
  smooth: boolean;
104
+ direction: "horizontal" | "vertical";
105
105
  offsetTop: number;
106
106
  boundary: number | "center" | "end" | "start" | "nearest";
107
107
  lineLess: boolean;
@@ -53,8 +53,8 @@ declare const Anchor: {
53
53
  change: (_hash: string) => any;
54
54
  select: (_hash: string | undefined, _preHash: string) => any;
55
55
  }, import("vue").PublicProps, {
56
- direction: "horizontal" | "vertical";
57
56
  smooth: boolean;
57
+ direction: "horizontal" | "vertical";
58
58
  offsetTop: number;
59
59
  boundary: number | "center" | "end" | "start" | "nearest";
60
60
  lineLess: boolean;
@@ -114,8 +114,8 @@ declare const Anchor: {
114
114
  onChange?: ((_hash: string) => any) | undefined;
115
115
  onSelect?: ((_hash: string | undefined, _preHash: string) => any) | undefined;
116
116
  }>, {}, {}, {}, {}, {
117
- direction: "horizontal" | "vertical";
118
117
  smooth: boolean;
118
+ direction: "horizontal" | "vertical";
119
119
  offsetTop: number;
120
120
  boundary: number | "center" | "end" | "start" | "nearest";
121
121
  lineLess: boolean;
@@ -175,8 +175,8 @@ declare const Anchor: {
175
175
  change: (_hash: string) => any;
176
176
  select: (_hash: string | undefined, _preHash: string) => any;
177
177
  }, string, {
178
- direction: "horizontal" | "vertical";
179
178
  smooth: boolean;
179
+ direction: "horizontal" | "vertical";
180
180
  offsetTop: number;
181
181
  boundary: number | "center" | "end" | "start" | "nearest";
182
182
  lineLess: boolean;
@@ -45,6 +45,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
45
45
  type: BooleanConstructor;
46
46
  default: boolean;
47
47
  };
48
+ fitWidth: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ maxWFull: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
48
56
  virtualListProps: {
49
57
  type: PropType<VirtualListProps>;
50
58
  };
@@ -104,6 +112,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
104
112
  type: BooleanConstructor;
105
113
  default: boolean;
106
114
  };
115
+ fitWidth: {
116
+ type: BooleanConstructor;
117
+ default: boolean;
118
+ };
119
+ maxWFull: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
107
123
  virtualListProps: {
108
124
  type: PropType<VirtualListProps>;
109
125
  };
@@ -116,13 +132,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
116
132
  onDropdownScroll?: ((_ev: Event) => any) | undefined;
117
133
  onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
118
134
  }>, {
135
+ strict: boolean;
136
+ disabled: boolean;
119
137
  readonly: string | boolean;
120
138
  data: (string | number | SelectOptionData | SelectOptionGroup)[];
121
- disabled: boolean;
122
139
  defaultValue: string;
123
140
  modelValue: string;
124
141
  allowClear: boolean;
142
+ fitWidth: boolean;
143
+ maxWFull: boolean;
125
144
  filterOption: FilterOption;
126
- strict: boolean;
127
145
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
128
146
  export default _default;
@@ -96,6 +96,22 @@ var auto_complete_default = /* @__PURE__ */ defineComponent({
96
96
  default: false
97
97
  },
98
98
  /**
99
+ * @zh 宽度是否适应文字内容
100
+ * @en Whether the width adapts to the text content
101
+ */
102
+ fitWidth: {
103
+ type: Boolean,
104
+ default: false
105
+ },
106
+ /**
107
+ * @zh 最大宽度是否限制为父容器宽度
108
+ * @en Whether the maximum width is limited to the parent container width
109
+ */
110
+ maxWFull: {
111
+ type: Boolean,
112
+ default: true
113
+ },
114
+ /**
99
115
  * @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动 [VirtualListProps](#VirtualListProps)
100
116
  * @en Pass the virtual list attribute, pass in this parameter to turn on virtual scrolling [VirtualListProps](#VirtualListProps)
101
117
  * @type VirtualListProps
@@ -326,6 +342,8 @@ var auto_complete_default = /* @__PURE__ */ defineComponent({
326
342
  "modelValue": computedValue.value,
327
343
  "disabled": mergedDisabled.value,
328
344
  "readonly": props.readonly,
345
+ "fitWidth": props.fitWidth,
346
+ "maxWFull": props.maxWFull,
329
347
  "inputAttrs": {
330
348
  "role": "combobox",
331
349
  "aria-haspopup": "listbox",
@@ -53,6 +53,14 @@ declare const AutoComplete: {
53
53
  type: BooleanConstructor;
54
54
  default: boolean;
55
55
  };
56
+ fitWidth: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ maxWFull: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
56
64
  virtualListProps: {
57
65
  type: import("vue").PropType<import("../_components/virtual-list/interface").VirtualListProps>;
58
66
  };
@@ -79,14 +87,16 @@ declare const AutoComplete: {
79
87
  dropdownScroll: (_ev: Event) => true;
80
88
  dropdownReachBottom: (_ev: Event) => true;
81
89
  }, import("vue").PublicProps, {
90
+ strict: boolean;
91
+ disabled: boolean;
82
92
  readonly: string | boolean;
83
93
  data: (string | number | SelectOptionData | SelectOptionGroup)[];
84
- disabled: boolean;
85
94
  defaultValue: string;
86
95
  modelValue: string;
87
96
  allowClear: boolean;
97
+ fitWidth: boolean;
98
+ maxWFull: boolean;
88
99
  filterOption: FilterOption;
89
- strict: boolean;
90
100
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
91
101
  P: {};
92
102
  B: {};
@@ -136,6 +146,14 @@ declare const AutoComplete: {
136
146
  type: BooleanConstructor;
137
147
  default: boolean;
138
148
  };
149
+ fitWidth: {
150
+ type: BooleanConstructor;
151
+ default: boolean;
152
+ };
153
+ maxWFull: {
154
+ type: BooleanConstructor;
155
+ default: boolean;
156
+ };
139
157
  virtualListProps: {
140
158
  type: import("vue").PropType<import("../_components/virtual-list/interface").VirtualListProps>;
141
159
  };
@@ -154,14 +172,16 @@ declare const AutoComplete: {
154
172
  focus(): void;
155
173
  blur(): void;
156
174
  }, {
175
+ strict: boolean;
176
+ disabled: boolean;
157
177
  readonly: string | boolean;
158
178
  data: (string | number | SelectOptionData | SelectOptionGroup)[];
159
- disabled: boolean;
160
179
  defaultValue: string;
161
180
  modelValue: string;
162
181
  allowClear: boolean;
182
+ fitWidth: boolean;
183
+ maxWFull: boolean;
163
184
  filterOption: FilterOption;
164
- strict: boolean;
165
185
  }>;
166
186
  __isFragment?: never;
167
187
  __isTeleport?: never;
@@ -208,6 +228,14 @@ declare const AutoComplete: {
208
228
  type: BooleanConstructor;
209
229
  default: boolean;
210
230
  };
231
+ fitWidth: {
232
+ type: BooleanConstructor;
233
+ default: boolean;
234
+ };
235
+ maxWFull: {
236
+ type: BooleanConstructor;
237
+ default: boolean;
238
+ };
211
239
  virtualListProps: {
212
240
  type: import("vue").PropType<import("../_components/virtual-list/interface").VirtualListProps>;
213
241
  };
@@ -234,14 +262,16 @@ declare const AutoComplete: {
234
262
  dropdownScroll: (_ev: Event) => true;
235
263
  dropdownReachBottom: (_ev: Event) => true;
236
264
  }, string, {
265
+ strict: boolean;
266
+ disabled: boolean;
237
267
  readonly: string | boolean;
238
268
  data: (string | number | SelectOptionData | SelectOptionGroup)[];
239
- disabled: boolean;
240
269
  defaultValue: string;
241
270
  modelValue: string;
242
271
  allowClear: boolean;
272
+ fitWidth: boolean;
273
+ maxWFull: boolean;
243
274
  filterOption: FilterOption;
244
- strict: boolean;
245
275
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
246
276
  install: (app: App, options?: SDOptions) => void;
247
277
  };
@@ -896,9 +896,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
896
896
  }) | undefined>;
897
897
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
898
898
  search: (params: ToolbarModelValue) => any;
899
+ reset: () => any;
899
900
  error: (error: unknown) => any;
900
901
  delete: (row: TableData, context?: unknown) => any;
901
- reset: () => any;
902
902
  create: () => any;
903
903
  edit: (row: TableData, context?: unknown) => any;
904
904
  "update:loading": (value: boolean) => any;
@@ -911,9 +911,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
911
911
  modalClose: () => any;
912
912
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
913
913
  onSearch?: ((params: ToolbarModelValue) => any) | undefined;
914
+ onReset?: (() => any) | undefined;
914
915
  onError?: ((error: unknown) => any) | undefined;
915
916
  onDelete?: ((row: TableData, context?: unknown) => any) | undefined;
916
- onReset?: (() => any) | undefined;
917
917
  onCreate?: (() => any) | undefined;
918
918
  onEdit?: ((row: TableData, context?: unknown) => any) | undefined;
919
919
  "onUpdate:loading"?: ((value: boolean) => any) | undefined;
@@ -25,6 +25,7 @@ var basic_crud_table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
25
25
  columns: {},
26
26
  tableProps: { default: () => ({}) },
27
27
  toolbarProps: { default: () => ({}) },
28
+ spinProps: {},
28
29
  modalProps: { default: () => ({}) },
29
30
  modalFormProps: { default: () => ({ schemas: [] }) },
30
31
  fullHeight: {
@@ -121,6 +122,7 @@ var basic_crud_table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
121
122
  const modalVisible = useModel(__props, "modalVisible");
122
123
  const slots = useSlots();
123
124
  const configProvider = inject(configProviderInjectionKey, void 0);
125
+ const resolvedSpinProps = computed(() => _objectSpread2(_objectSpread2({}, configProvider === null || configProvider === void 0 ? void 0 : configProvider.basicCrudTableSpinProps), __props.spinProps));
124
126
  const toolbarRef = shallowRef();
125
127
  const modalRef = shallowRef();
126
128
  const current = shallowRef(resolvePaginationNumber("current", "defaultCurrent", 1));
@@ -431,10 +433,10 @@ var basic_crud_table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
431
433
  })
432
434
  ]), 1040, ["modelValue", "loading"])) : createCommentVNode("", true)
433
435
  ], 2)) : createCommentVNode("", true),
434
- createVNode(unref(Spin), {
436
+ createVNode(unref(Spin), mergeProps(resolvedSpinProps.value, {
435
437
  loading: loading.value,
436
- class: normalizeClass(`${unref(prefixCls)}-body`)
437
- }, {
438
+ class: `${unref(prefixCls)}-body`
439
+ }), {
438
440
  default: withCtx(() => [createVNode(unref(Table), mergeProps(__props.tableProps, {
439
441
  scroll: resolvedTableScroll.value,
440
442
  columns: resolvedColumns.value,
@@ -488,7 +490,7 @@ var basic_crud_table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
488
490
  "pagination"
489
491
  ])]),
490
492
  _: 3
491
- }, 8, ["loading", "class"]),
493
+ }, 16, ["loading", "class"]),
492
494
  createVNode(basic_crud_modal_default, {
493
495
  ref_key: "modalRef",
494
496
  ref: modalRef,
@@ -10,9 +10,9 @@ declare const BasicCrudTable: {
10
10
  modalVisible?: boolean;
11
11
  }> & Readonly<{
12
12
  onSearch?: ((params: import("../index.ts").ToolbarModelValue) => any) | undefined;
13
+ onReset?: (() => any) | undefined;
13
14
  onError?: ((error: unknown) => any) | undefined;
14
15
  onDelete?: ((row: import("../index.ts").TableData, context?: unknown) => any) | undefined;
15
- onReset?: (() => any) | undefined;
16
16
  onCreate?: (() => any) | undefined;
17
17
  onEdit?: ((row: import("../index.ts").TableData, context?: unknown) => any) | undefined;
18
18
  "onUpdate:loading"?: ((value: boolean) => any) | undefined;
@@ -892,9 +892,9 @@ declare const BasicCrudTable: {
892
892
  }) | undefined>;
893
893
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
894
894
  search: (params: import("../index.ts").ToolbarModelValue) => any;
895
+ reset: () => any;
895
896
  error: (error: unknown) => any;
896
897
  delete: (row: import("../index.ts").TableData, context?: unknown) => any;
897
- reset: () => any;
898
898
  create: () => any;
899
899
  edit: (row: import("../index.ts").TableData, context?: unknown) => any;
900
900
  "update:loading": (value: boolean) => any;
@@ -920,9 +920,9 @@ declare const BasicCrudTable: {
920
920
  modalVisible?: boolean;
921
921
  }> & Readonly<{
922
922
  onSearch?: ((params: import("../index.ts").ToolbarModelValue) => any) | undefined;
923
+ onReset?: (() => any) | undefined;
923
924
  onError?: ((error: unknown) => any) | undefined;
924
925
  onDelete?: ((row: import("../index.ts").TableData, context?: unknown) => any) | undefined;
925
- onReset?: (() => any) | undefined;
926
926
  onCreate?: (() => any) | undefined;
927
927
  onEdit?: ((row: import("../index.ts").TableData, context?: unknown) => any) | undefined;
928
928
  "onUpdate:loading"?: ((value: boolean) => any) | undefined;
@@ -1812,9 +1812,9 @@ declare const BasicCrudTable: {
1812
1812
  modalVisible?: boolean;
1813
1813
  }> & Readonly<{
1814
1814
  onSearch?: ((params: import("../index.ts").ToolbarModelValue) => any) | undefined;
1815
+ onReset?: (() => any) | undefined;
1815
1816
  onError?: ((error: unknown) => any) | undefined;
1816
1817
  onDelete?: ((row: import("../index.ts").TableData, context?: unknown) => any) | undefined;
1817
- onReset?: (() => any) | undefined;
1818
1818
  onCreate?: (() => any) | undefined;
1819
1819
  onEdit?: ((row: import("../index.ts").TableData, context?: unknown) => any) | undefined;
1820
1820
  "onUpdate:loading"?: ((value: boolean) => any) | undefined;
@@ -2694,9 +2694,9 @@ declare const BasicCrudTable: {
2694
2694
  }) | undefined>;
2695
2695
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2696
2696
  search: (params: import("../index.ts").ToolbarModelValue) => any;
2697
+ reset: () => any;
2697
2698
  error: (error: unknown) => any;
2698
2699
  delete: (row: import("../index.ts").TableData, context?: unknown) => any;
2699
- reset: () => any;
2700
2700
  create: () => any;
2701
2701
  edit: (row: import("../index.ts").TableData, context?: unknown) => any;
2702
2702
  "update:loading": (value: boolean) => any;
@@ -1,6 +1,7 @@
1
1
  import type { UnknownRecord } from 'type-fest';
2
2
  import type { JsonFormProps } from '../json-form';
3
3
  import type ModalComponent from '../modal/modal.vue';
4
+ import type { SpinProps } from '../spin';
4
5
  import type { TableColumnData, TableData, TableInstance } from '../table';
5
6
  import type { ToolbarProps } from '../toolbar';
6
7
  export type MaybePromise<T> = T | Promise<T>;
@@ -19,6 +20,7 @@ export interface BasicCrudTableProps<TRow extends TableData = TableData> {
19
20
  columns: TableColumnData[];
20
21
  tableProps?: BasicCrudTableTableProps;
21
22
  toolbarProps?: BasicCrudTableToolbarProps;
23
+ spinProps?: SpinProps;
22
24
  modalProps?: BasicCrudTableModalProps;
23
25
  modalFormProps?: BasicCrudTableModalFormProps;
24
26
  fullHeight?: boolean;
@@ -107,12 +107,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
107
107
  }>> & Readonly<{
108
108
  onClick?: ((_ev: MouseEvent) => any) | undefined;
109
109
  }>, {
110
- autofocus: boolean;
111
110
  disabled: boolean;
111
+ autofocus: boolean;
112
112
  loading: boolean;
113
113
  long: boolean;
114
114
  loadingFixedWidth: boolean;
115
- htmlType: "reset" | "submit" | "button";
115
+ htmlType: "button" | "reset" | "submit";
116
116
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
117
117
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
118
118
  declare const _default: typeof __VLS_export;
@@ -48,12 +48,12 @@ declare const Button: {
48
48
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
49
49
  click: (_ev: MouseEvent) => any;
50
50
  }, import("vue").PublicProps, {
51
- autofocus: boolean;
52
51
  disabled: boolean;
52
+ autofocus: boolean;
53
53
  loading: boolean;
54
54
  long: boolean;
55
55
  loadingFixedWidth: boolean;
56
- htmlType: "reset" | "submit" | "button";
56
+ htmlType: "button" | "reset" | "submit";
57
57
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
58
58
  P: {};
59
59
  B: {};
@@ -104,12 +104,12 @@ declare const Button: {
104
104
  }>> & Readonly<{
105
105
  onClick?: ((_ev: MouseEvent) => any) | undefined;
106
106
  }>, {}, {}, {}, {}, {
107
- autofocus: boolean;
108
107
  disabled: boolean;
108
+ autofocus: boolean;
109
109
  loading: boolean;
110
110
  long: boolean;
111
111
  loadingFixedWidth: boolean;
112
- htmlType: "reset" | "submit" | "button";
112
+ htmlType: "button" | "reset" | "submit";
113
113
  }>;
114
114
  __isFragment?: never;
115
115
  __isTeleport?: never;
@@ -159,12 +159,12 @@ declare const Button: {
159
159
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
160
160
  click: (_ev: MouseEvent) => any;
161
161
  }, string, {
162
- autofocus: boolean;
163
162
  disabled: boolean;
163
+ autofocus: boolean;
164
164
  loading: boolean;
165
165
  long: boolean;
166
166
  loadingFixedWidth: boolean;
167
- htmlType: "reset" | "submit" | "button";
167
+ htmlType: "button" | "reset" | "submit";
168
168
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
169
169
  $slots: {
170
170
  icon?: (props: {}) => any;
package/es/card/card.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PropType, CSSProperties } from 'vue';
2
+ import type { SpinProps } from '../spin';
2
3
  import { type ScrollbarProps } from '../scrollbar';
3
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
5
  bordered: {
@@ -9,6 +10,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
9
10
  type: BooleanConstructor;
10
11
  default: boolean;
11
12
  };
13
+ spinProps: {
14
+ type: PropType<SpinProps>;
15
+ };
12
16
  hoverable: {
13
17
  type: BooleanConstructor;
14
18
  default: boolean;
@@ -47,6 +51,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
47
51
  type: BooleanConstructor;
48
52
  default: boolean;
49
53
  };
54
+ spinProps: {
55
+ type: PropType<SpinProps>;
56
+ };
50
57
  hoverable: {
51
58
  type: BooleanConstructor;
52
59
  default: boolean;
@@ -91,6 +98,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
91
98
  type: NumberConstructor;
92
99
  };
93
100
  loading: BooleanConstructor;
101
+ delay: {
102
+ type: (BooleanConstructor | NumberConstructor)[];
103
+ default: boolean;
104
+ };
94
105
  dot: BooleanConstructor;
95
106
  tip: StringConstructor;
96
107
  hideIcon: {
@@ -98,8 +109,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
98
109
  default: boolean;
99
110
  };
100
111
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
101
- loading: boolean;
102
112
  dot: boolean;
113
+ loading: boolean;
114
+ delay: number | boolean;
103
115
  hideIcon: boolean;
104
116
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
105
117
  P: {};
@@ -113,6 +125,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
113
125
  type: NumberConstructor;
114
126
  };
115
127
  loading: BooleanConstructor;
128
+ delay: {
129
+ type: (BooleanConstructor | NumberConstructor)[];
130
+ default: boolean;
131
+ };
116
132
  dot: BooleanConstructor;
117
133
  tip: StringConstructor;
118
134
  hideIcon: {
@@ -120,8 +136,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
120
136
  default: boolean;
121
137
  };
122
138
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
123
- loading: boolean;
124
139
  dot: boolean;
140
+ loading: boolean;
141
+ delay: number | boolean;
125
142
  hideIcon: boolean;
126
143
  }>;
127
144
  __isFragment?: never;
@@ -132,6 +149,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
132
149
  type: NumberConstructor;
133
150
  };
134
151
  loading: BooleanConstructor;
152
+ delay: {
153
+ type: (BooleanConstructor | NumberConstructor)[];
154
+ default: boolean;
155
+ };
135
156
  dot: BooleanConstructor;
136
157
  tip: StringConstructor;
137
158
  hideIcon: {
@@ -139,8 +160,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
139
160
  default: boolean;
140
161
  };
141
162
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
142
- loading: boolean;
143
163
  dot: boolean;
164
+ loading: boolean;
165
+ delay: number | boolean;
144
166
  hideIcon: boolean;
145
167
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
146
168
  install: (app: import("vue").App, options?: import("../_utils/types").SDOptions) => void;
package/es/card/card.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { configProviderInjectionKey } from "../config-provider/context.js";
2
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
1
3
  import { getPrefixCls } from "../_utils/global-config.js";
2
4
  import { getAllElements } from "../_utils/vue-utils.js";
3
5
  import { useSize } from "../_hooks/use-size.js";
@@ -5,7 +7,7 @@ import { useScrollbar } from "../_hooks/use-scrollbar.js";
5
7
  import Scrollbar from "../scrollbar/index.js";
6
8
  import Spin from "../spin/index.js";
7
9
  import { cardInjectionKey } from "./context.js";
8
- import { computed, createVNode, defineComponent, mergeProps, provide, reactive, toRef, toRefs } from "vue";
10
+ import { computed, createVNode, defineComponent, inject, mergeProps, provide, reactive, toRef, toRefs } from "vue";
9
11
  //#region components/card/card.tsx
10
12
  var card_default = /* @__PURE__ */ defineComponent({
11
13
  name: "Card",
@@ -31,6 +33,11 @@ var card_default = /* @__PURE__ */ defineComponent({
31
33
  default: false
32
34
  },
33
35
  /**
36
+ * @zh 传递给加载中 Spin 的属性
37
+ * @en Props passed to the loading Spin
38
+ */
39
+ spinProps: { type: Object },
40
+ /**
34
41
  * @zh 是否可悬浮
35
42
  * @en Can be hovered
36
43
  */
@@ -110,6 +117,8 @@ var card_default = /* @__PURE__ */ defineComponent({
110
117
  * @slot actions
111
118
  */
112
119
  setup(props, { slots }) {
120
+ const configCtx = inject(configProviderInjectionKey, void 0);
121
+ const mergedSpinProps = computed(() => _objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.cardSpinProps), props.spinProps));
113
122
  const prefixCls = getPrefixCls("card");
114
123
  const { size } = toRefs(props);
115
124
  const { mergedSize: _mergedSize } = useSize(size);
@@ -161,7 +170,7 @@ var card_default = /* @__PURE__ */ defineComponent({
161
170
  createVNode("div", {
162
171
  "class": bodyCls.value,
163
172
  "style": props.bodyStyle
164
- }, [props.loading ? createVNode(Spin, null, null) : scrollEnabled.value ? createVNode(Scrollbar, mergeProps(scrollbarProps.value, { "outerClass": `${prefixCls}-body-scrollbar` }), { default: () => {
173
+ }, [props.loading ? createVNode(Spin, mergedSpinProps.value, null) : scrollEnabled.value ? createVNode(Scrollbar, mergeProps(scrollbarProps.value, { "outerClass": `${prefixCls}-body-scrollbar` }), { default: () => {
165
174
  var _slots$default;
166
175
  return [(_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
167
176
  } }) : (_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots), slots.actions && !cardContext.hasMeta && renderActions(slots.actions())])