@tu-design/vue 0.5.6 → 0.5.8

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 (56) hide show
  1. package/dist/index.d.mts +160 -56
  2. package/dist/index.mjs +688 -76
  3. package/dist/registry/vue/alert-dialog.json +1 -1
  4. package/dist/registry/vue/alert.json +1 -1
  5. package/dist/registry/vue/avatar-group.json +1 -1
  6. package/dist/registry/vue/avatar.json +2 -2
  7. package/dist/registry/vue/badge.json +1 -1
  8. package/dist/registry/vue/button.json +1 -1
  9. package/dist/registry/vue/calendar.json +3 -3
  10. package/dist/registry/vue/card.json +1 -1
  11. package/dist/registry/vue/cascader.json +1 -1
  12. package/dist/registry/vue/checkbox.json +1 -1
  13. package/dist/registry/vue/context-menu.json +1 -1
  14. package/dist/registry/vue/currency-input.json +2 -2
  15. package/dist/registry/vue/date-picker.json +1 -1
  16. package/dist/registry/vue/date-range-picker.json +1 -1
  17. package/dist/registry/vue/date-shared.json +4 -4
  18. package/dist/registry/vue/dialog.json +1 -1
  19. package/dist/registry/vue/drawer.json +1 -1
  20. package/dist/registry/vue/dropdown-menu.json +1 -1
  21. package/dist/registry/vue/empty.json +1 -1
  22. package/dist/registry/vue/form-render.json +12 -12
  23. package/dist/registry/vue/form.json +1 -1
  24. package/dist/registry/vue/icon-shared.json +1 -1
  25. package/dist/registry/vue/input.json +1 -1
  26. package/dist/registry/vue/label.json +1 -1
  27. package/dist/registry/vue/month-picker.json +1 -1
  28. package/dist/registry/vue/number-input.json +3 -3
  29. package/dist/registry/vue/overlay-shared.json +5 -5
  30. package/dist/registry/vue/password-input.json +1 -1
  31. package/dist/registry/vue/pin-input.json +1 -1
  32. package/dist/registry/vue/popconfirm.json +1 -1
  33. package/dist/registry/vue/popover.json +2 -2
  34. package/dist/registry/vue/progress.json +1 -1
  35. package/dist/registry/vue/radio-group.json +1 -1
  36. package/dist/registry/vue/registry.json +52 -52
  37. package/dist/registry/vue/select.json +3 -3
  38. package/dist/registry/vue/separator.json +1 -1
  39. package/dist/registry/vue/skeleton.json +1 -1
  40. package/dist/registry/vue/slider.json +1 -1
  41. package/dist/registry/vue/slot.json +3 -2
  42. package/dist/registry/vue/spin.json +1 -1
  43. package/dist/registry/vue/switch.json +1 -1
  44. package/dist/registry/vue/table-render.json +9 -9
  45. package/dist/registry/vue/tabs.json +2 -1
  46. package/dist/registry/vue/textarea.json +1 -1
  47. package/dist/registry/vue/timeline.json +2 -2
  48. package/dist/registry/vue/toast.json +2 -2
  49. package/dist/registry/vue/tokens.json +1 -1
  50. package/dist/registry/vue/tooltip.json +1 -1
  51. package/dist/registry/vue/tree-select.json +1 -1
  52. package/dist/registry/vue/tree-shared.json +9 -9
  53. package/dist/registry/vue/utils.json +2 -2
  54. package/dist/registry/vue/week-picker.json +2 -2
  55. package/dist/registry/vue/year-picker.json +1 -1
  56. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -12,6 +12,11 @@ import { Table } from "@tanstack/vue-table";
12
12
  import { Toast, ToastOptions as ToastOptions$1, ToastPlacement as ToastPlacement$1, ToastPromiseOptions as ToastPromiseOptions$1 } from "@ark-ui/vue/toast";
13
13
  import { PositioningOptions } from "@zag-js/popper";
14
14
  //#region src/lib/utils.d.ts
15
+ /**
16
+ * 合并 Tailwind CSS 类名:clsx 组合条件类名,tailwind-merge 消解冲突规则。
17
+ * @param inputs - 任意数量的类名值(字符串、数组或对象)
18
+ * @returns 消解冲突后的类名字符串
19
+ */
15
20
  export declare function cn(...inputs: ClassValue[]): string;
16
21
  //#endregion
17
22
  //#region src/resolver.d.ts
@@ -30,6 +35,12 @@ export interface ComponentResolveResult {
30
35
  from: string;
31
36
  }
32
37
  export type ComponentResolver = (name: string) => ComponentResolveResult | undefined;
38
+ /**
39
+ * 创建 unplugin-vue-components 的自动导入 Resolver:T 前缀(PascalCase)且命中
40
+ * 白名单的组件名(如 TButton)被解析为对应库导出;其余名称返回 undefined
41
+ * 交由后续 Resolver 或默认流程处理。
42
+ * @returns Resolver 函数(组件名到导入描述的映射)
43
+ */
33
44
  export declare function TuDesignResolver(): ComponentResolver;
34
45
  //#endregion
35
46
  //#region src/components/checkbox/Checkbox.vue.d.ts
@@ -97,10 +108,10 @@ declare const __VLS_base$34: import("vue").DefineComponent<import("vue").Extract
97
108
  "onUpdate:checked"?: (checked: boolean) => any;
98
109
  }>, {
99
110
  class: string;
100
- name: string;
101
- disabled: boolean;
102
111
  checked: boolean | "indeterminate";
103
112
  defaultChecked: boolean;
113
+ disabled: boolean;
114
+ name: string;
104
115
  form: string;
105
116
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
106
117
  declare const __VLS_export$52: __VLS_WithSlots$34<typeof __VLS_base$34, __VLS_Slots$34>;
@@ -118,11 +129,19 @@ type CurrencyUnit = "万" | "元" | "角" | "分";
118
129
  * 解析输入文本为 valueUnit 单位的数值(number|null)。
119
130
  * 全程十进制字符串移位(BigInt),仅在超出整数分精度时一次四舍五入;
120
131
  * 白名单 ^\d*(\.\d*)?$,负号/非法字符/无数字一律 null。
132
+ * @param raw - 用户键入的数字文本(labelUnit 单位)
133
+ * @param labelUnit - 输入文本的货币单位
134
+ * @param valueUnit - 输出数值的目标货币单位
135
+ * @returns valueUnit 单位的数值;格式非法或不含数字时返回 null
121
136
  */
122
137
  export declare function parseCurrency(raw: string, labelUnit: CurrencyUnit, valueUnit: CurrencyUnit): number | null;
123
138
  /**
124
139
  * 受控值(valueUnit 单位)反算为 labelUnit 单位的回显文本。
125
140
  * 值先取整到整数分(吸收浮点噪声),再做十进制移位并去尾零。
141
+ * @param value - 受控值(valueUnit 单位)
142
+ * @param valueUnit - 受控值的货币单位
143
+ * @param labelUnit - 回显文本的目标货币单位
144
+ * @returns labelUnit 单位的回显文本(已去尾零);非有限值返回空串
126
145
  */
127
146
  export declare function formatCurrency(value: number, valueUnit: CurrencyUnit, labelUnit: CurrencyUnit): string;
128
147
  //#endregion
@@ -197,9 +216,9 @@ declare const __VLS_export$51: import("vue").DefineComponent<import("vue").Extra
197
216
  "onUpdate:modelValue"?: (value: number) => any;
198
217
  }>, {
199
218
  class: string;
219
+ disabled: boolean;
200
220
  modelValue: number;
201
221
  placeholder: string;
202
- disabled: boolean;
203
222
  invalid: boolean;
204
223
  labelUnit: CurrencyUnit;
205
224
  valueUnit: CurrencyUnit;
@@ -370,19 +389,19 @@ declare const __VLS_export$50: import("vue").DefineComponent<import("vue").Extra
370
389
  "onUpdate:open"?: (open: boolean) => any;
371
390
  }>, {
372
391
  class: string;
373
- max: string;
392
+ disabled: boolean;
374
393
  modelValue: string;
375
394
  defaultValue: string;
395
+ min: string;
396
+ max: string;
397
+ isDateUnavailable: (date: DateValue) => boolean;
398
+ locale: string;
376
399
  open: boolean;
377
400
  defaultOpen: boolean;
378
401
  placeholder: string;
379
- disabled: boolean;
380
402
  invalid: boolean;
381
403
  readOnly: boolean;
382
- min: string;
383
- isDateUnavailable: (date: DateValue) => boolean;
384
404
  closeOnSelect: boolean;
385
- locale: string;
386
405
  positioning: import("@zag-js/popper").PositioningOptions;
387
406
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
388
407
  declare const _default$12: typeof __VLS_export$50;
@@ -546,21 +565,21 @@ declare const __VLS_export$49: import("vue").DefineComponent<import("vue").Extra
546
565
  "onUpdate:open"?: (open: boolean) => any;
547
566
  }>, {
548
567
  class: string;
549
- max: string;
568
+ disabled: boolean;
569
+ numOfMonths: number;
550
570
  modelValue: [string, string];
551
571
  defaultValue: [string, string];
572
+ min: string;
573
+ max: string;
574
+ isDateUnavailable: (date: DateValue) => boolean;
575
+ locale: string;
552
576
  open: boolean;
553
577
  defaultOpen: boolean;
554
578
  placeholder: string;
555
- disabled: boolean;
556
579
  invalid: boolean;
557
580
  readOnly: boolean;
558
- min: string;
559
- isDateUnavailable: (date: DateValue) => boolean;
560
581
  closeOnSelect: boolean;
561
- locale: string;
562
582
  positioning: import("@zag-js/popper").PositioningOptions;
563
- numOfMonths: number;
564
583
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
565
584
  declare const _default$13: typeof __VLS_export$49;
566
585
  //#endregion
@@ -723,18 +742,18 @@ declare const __VLS_export$47: import("vue").DefineComponent<import("vue").Extra
723
742
  "onUpdate:open"?: (open: boolean) => any;
724
743
  }>, {
725
744
  class: string;
726
- max: string;
745
+ disabled: boolean;
727
746
  modelValue: string;
728
747
  defaultValue: string;
748
+ min: string;
749
+ max: string;
750
+ locale: string;
729
751
  open: boolean;
730
752
  defaultOpen: boolean;
731
753
  placeholder: string;
732
- disabled: boolean;
733
754
  invalid: boolean;
734
755
  readOnly: boolean;
735
- min: string;
736
756
  closeOnSelect: boolean;
737
- locale: string;
738
757
  positioning: import("@zag-js/popper").PositioningOptions;
739
758
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
740
759
  declare const _default$29: typeof __VLS_export$47;
@@ -892,19 +911,19 @@ declare const __VLS_export$46: import("vue").DefineComponent<import("vue").Extra
892
911
  "onUpdate:open"?: (open: boolean) => any;
893
912
  }>, {
894
913
  class: string;
895
- max: string;
914
+ disabled: boolean;
896
915
  modelValue: string;
897
916
  defaultValue: string;
917
+ min: string;
918
+ max: string;
919
+ isDateUnavailable: (date: DateValue) => boolean;
920
+ locale: string;
898
921
  open: boolean;
899
922
  defaultOpen: boolean;
900
923
  placeholder: string;
901
- disabled: boolean;
902
924
  invalid: boolean;
903
925
  readOnly: boolean;
904
- min: string;
905
- isDateUnavailable: (date: DateValue) => boolean;
906
926
  closeOnSelect: boolean;
907
- locale: string;
908
927
  positioning: import("@zag-js/popper").PositioningOptions;
909
928
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
910
929
  declare const _default$51: typeof __VLS_export$46;
@@ -990,11 +1009,11 @@ declare const __VLS_base$33: import("vue").DefineComponent<import("vue").Extract
990
1009
  "onUpdate:modelValue"?: (value: number) => any;
991
1010
  }>, {
992
1011
  class: string;
993
- max: number;
994
- modelValue: number;
995
1012
  disabled: boolean;
996
- invalid: boolean;
1013
+ modelValue: number;
997
1014
  min: number;
1015
+ max: number;
1016
+ invalid: boolean;
998
1017
  step: number;
999
1018
  formatOptions: Intl.NumberFormatOptions;
1000
1019
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1007,7 +1026,11 @@ type __VLS_WithSlots$33<T, S> = T & {
1007
1026
  };
1008
1027
  //#endregion
1009
1028
  //#region src/components/number-input/utils.d.ts
1010
- /** Ark ValueChangeDetails → number|null(空串/NaN 归一 null,numberOrNull 为可单测的纯函数) */
1029
+ /**
1030
+ * Ark ValueChangeDetails → number|null(空串/NaN 归一 null,numberOrNull 为可单测的纯函数)
1031
+ * @param details - Ark NumberInput 的 ValueChangeDetails
1032
+ * @returns 有效数字;空串或 NaN 时返回 null
1033
+ */
1011
1034
  export declare function numberOrNull(details: {
1012
1035
  value: string;
1013
1036
  valueAsNumber: number;
@@ -1090,9 +1113,9 @@ declare const __VLS_base$32: import("vue").DefineComponent<import("vue").Extract
1090
1113
  "onUpdate:visible"?: (visible: boolean) => any;
1091
1114
  }>, {
1092
1115
  class: string;
1116
+ disabled: boolean;
1093
1117
  modelValue: string;
1094
1118
  placeholder: string;
1095
- disabled: boolean;
1096
1119
  invalid: boolean;
1097
1120
  visible: boolean;
1098
1121
  autoComplete: "current-password" | "new-password";
@@ -1361,12 +1384,12 @@ declare const __VLS_export$42: import("vue").DefineComponent<import("vue").Extra
1361
1384
  "onUpdate:show"?: (open: boolean) => any;
1362
1385
  }>, {
1363
1386
  class: string;
1387
+ disabled: boolean;
1364
1388
  modelValue: Key | Key[];
1365
1389
  defaultValue: Key | Key[];
1366
1390
  open: boolean;
1367
1391
  defaultOpen: boolean;
1368
1392
  placeholder: string;
1369
- disabled: boolean;
1370
1393
  positioning: import("@zag-js/popper").PositioningOptions;
1371
1394
  multiple: boolean;
1372
1395
  checkable: boolean;
@@ -1575,12 +1598,12 @@ declare const __VLS_export$41: import("vue").DefineComponent<import("vue").Extra
1575
1598
  "onUpdate:expandedKeys"?: (keys: Key[]) => any;
1576
1599
  }>, {
1577
1600
  class: string;
1601
+ disabled: boolean;
1578
1602
  modelValue: Key | Key[];
1579
1603
  defaultValue: Key | Key[];
1580
1604
  open: boolean;
1581
1605
  defaultOpen: boolean;
1582
1606
  placeholder: string;
1583
- disabled: boolean;
1584
1607
  positioning: import("@zag-js/popper").PositioningOptions;
1585
1608
  multiple: boolean;
1586
1609
  checkable: boolean;
@@ -1747,8 +1770,8 @@ declare const __VLS_export$39: import("vue").DefineComponent<__VLS_Props$11, {},
1747
1770
  }, string, import("vue").PublicProps, Readonly<__VLS_Props$11> & Readonly<{
1748
1771
  "onUpdate:modelValue"?: (value: number[]) => any;
1749
1772
  }>, {
1750
- max: number;
1751
1773
  min: number;
1774
+ max: number;
1752
1775
  step: number;
1753
1776
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1754
1777
  declare const _default$40: typeof __VLS_export$39;
@@ -1798,9 +1821,9 @@ declare const __VLS_base$29: import("vue").DefineComponent<import("vue").Extract
1798
1821
  "onUpdate:checked"?: (checked: boolean) => any;
1799
1822
  }>, {
1800
1823
  class: string;
1801
- disabled: boolean;
1802
1824
  checked: boolean;
1803
1825
  defaultChecked: boolean;
1826
+ disabled: boolean;
1804
1827
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1805
1828
  declare const __VLS_export$38: __VLS_WithSlots$29<typeof __VLS_base$29, __VLS_Slots$29>;
1806
1829
  declare const _default$42: typeof __VLS_export$38;
@@ -1969,18 +1992,18 @@ declare const __VLS_export$36: import("vue").DefineComponent<import("vue").Extra
1969
1992
  "onUpdate:open"?: (open: boolean) => any;
1970
1993
  }>, {
1971
1994
  class: string;
1972
- max: string;
1995
+ disabled: boolean;
1973
1996
  modelValue: string;
1974
1997
  defaultValue: string;
1998
+ min: string;
1999
+ max: string;
2000
+ locale: string;
1975
2001
  open: boolean;
1976
2002
  defaultOpen: boolean;
1977
2003
  placeholder: string;
1978
- disabled: boolean;
1979
2004
  invalid: boolean;
1980
2005
  readOnly: boolean;
1981
- min: string;
1982
2006
  closeOnSelect: boolean;
1983
- locale: string;
1984
2007
  positioning: import("@zag-js/popper").PositioningOptions;
1985
2008
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1986
2009
  declare const _default$52: typeof __VLS_export$36;
@@ -2278,6 +2301,8 @@ interface DefineFormOptions<T extends object> {
2278
2301
  * - `actions` 按钮预设(searchable 等七项直传):存在时 `<FormRender>` 组件按钮 props 全量忽略(A1 块级互斥)。
2279
2302
  *
2280
2303
  * 须在组件 setup 中调用(TanStack useForm 约束)。
2304
+ * @param config - 表单配置:字段定义、校验 schema、提交回调、按钮预设七项与 TanStack 透传项
2305
+ * @returns 表单渲染 definition(items + form + resetToDefaults + submit + actions?),直接传给 <FormRender>
2281
2306
  */
2282
2307
  export declare function defineForm<T extends object>(config: DefineFormOptions<T>): FormRenderDefinition<T>;
2283
2308
  //#endregion
@@ -2306,6 +2331,8 @@ interface UseFormRenderOptions<T extends object> {
2306
2331
  * - `defaultValues` 从 `items[].default` 派生(值或同步工厂,缺省 null)——单一真相源;
2307
2332
  * - 显式泛型 `useForm<T>`,保住 onSubmit `{ value: T }` 全链路推断;
2308
2333
  * - 须在组件 setup 中调用(TanStack useForm 内部 `onMounted(formApi.mount)`)。
2334
+ * @param options - 表单选项:字段定义、校验 schema、提交回调、按钮预设七项与 TanStack 透传项
2335
+ * @returns 表单渲染 definition(items + form + resetToDefaults + submit + actions?)
2309
2336
  */
2310
2337
  export declare function useFormRender<T extends object>(options: UseFormRenderOptions<T>): FormRenderDefinition<T>;
2311
2338
  //#endregion
@@ -2314,6 +2341,7 @@ export declare function useFormRender<T extends object>(options: UseFormRenderOp
2314
2341
  * widget 注册表:`r.input({...})` 等柯里化工厂的运行时对象。
2315
2342
  * 文件按绑定形态聚合:input / model-value(modelValue 系)/ boolean(checked 系)/
2316
2343
  * value(radioGroup/slider)/ select(多子组件组装)。
2344
+ * @returns 各 widget 类型的柯里化工厂映射(render 为恒等直通),供 FormRender 渲染时调用
2317
2345
  */
2318
2346
  export declare function widgetRenders<T extends object>(): WidgetRenders<T>;
2319
2347
  //#endregion
@@ -2340,6 +2368,9 @@ export declare const SLIDER: BindingSpec;
2340
2368
  /**
2341
2369
  * TanStack field → 控件 props 的统一绑定:
2342
2370
  * 值回显(field.state.value)+ 写回(handleChange)+ 失焦(handleBlur)。
2371
+ * @param field - TanStack 表单字段实例,提供值读取与变更/失焦句柄
2372
+ * @param spec - 绑定形态描述,决定值 prop 名、事件名与可选的双向转换
2373
+ * @returns 可展开到组件 props 上的对象(值 prop、onUpdate:<event>、onBlur)
2343
2374
  */
2344
2375
  export declare function bindField(field: AnyFieldApi, spec: BindingSpec): {
2345
2376
  [x: string]: any;
@@ -2594,13 +2625,13 @@ declare const __VLS_base$23: import("vue").DefineComponent<import("vue").Extract
2594
2625
  "onUpdate:modelValue"?: (value: string) => any;
2595
2626
  }>, {
2596
2627
  mode: "day" | "month" | "year";
2597
- max: string;
2628
+ numOfMonths: number;
2598
2629
  modelValue: string;
2599
2630
  defaultValue: string;
2600
2631
  min: string;
2632
+ max: string;
2601
2633
  isDateUnavailable: (date: DateValue) => boolean;
2602
2634
  locale: string;
2603
- numOfMonths: number;
2604
2635
  week: boolean;
2605
2636
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2606
2637
  declare const __VLS_export$30: __VLS_WithSlots$23<typeof __VLS_base$23, __VLS_Slots$23>;
@@ -3236,9 +3267,9 @@ declare const __VLS_base$13: import("vue").DefineComponent<import("vue").Extract
3236
3267
  class: string;
3237
3268
  length: number;
3238
3269
  type: "numeric" | "alphanumeric";
3270
+ disabled: boolean;
3239
3271
  modelValue: string[];
3240
3272
  placeholder: string;
3241
- disabled: boolean;
3242
3273
  invalid: boolean;
3243
3274
  otp: boolean;
3244
3275
  mask: boolean;
@@ -3471,9 +3502,9 @@ declare const __VLS_base$12: import("vue").DefineComponent<import("vue").Extract
3471
3502
  }>> & Readonly<{
3472
3503
  "onUpdate:open"?: (open: boolean) => any;
3473
3504
  }>, {
3505
+ disabled: boolean;
3474
3506
  open: boolean;
3475
3507
  defaultOpen: boolean;
3476
- disabled: boolean;
3477
3508
  lazyMount: boolean;
3478
3509
  unmountOnExit: boolean;
3479
3510
  contentClass: string;
@@ -3565,12 +3596,14 @@ interface ColumnRenders<T extends DataRecord> {
3565
3596
  date: (pattern?: DateColumnPattern) => ColumnRender<T>;
3566
3597
  currency: (currency?: string, locale?: string) => ColumnRender<T>;
3567
3598
  serial: (base?: number) => ColumnRender<T>;
3599
+ /** 操作列按钮组;按钮组为行内级(inline-flex),随单元格 align 对齐(默认居中) */
3568
3600
  button: (items: Array<TableActionButton<T> | string>) => ColumnRender<T>;
3569
3601
  }
3570
3602
  /**
3571
3603
  * 内置列渲染器工厂(对标 x-render table-columns,v1:dict/date/currency/serial/button)。
3572
3604
  * 返回值直接填入 TableColumnOptions.render;column 参数用于读取字段值。
3573
3605
  * 与 FormRender widget 的 r.xxx() 范式共词根(D10)。
3606
+ * @returns 各内置渲染器集合(render/dict/date/currency/serial/button)
3574
3607
  */
3575
3608
  export declare function columnRenders<T extends DataRecord>(): ColumnRenders<T>;
3576
3609
  //#endregion
@@ -3589,6 +3622,7 @@ interface TableColumnOptions<T extends DataRecord = DataRecord> {
3589
3622
  /** 列标识,同时作为默认取值字段 */
3590
3623
  key: string;
3591
3624
  title: string;
3625
+ /** 单元格水平对齐;未配置默认居中(表头/表体一致),显式 "left" 退出默认 */
3592
3626
  align?: "left" | "center" | "right";
3593
3627
  /** 列宽(R32)。数字(px):布局硬约束 —— 参与表格 min-width 求和与 fixed 列 sticky 偏移推算;
3594
3628
  * 字符串(如 "10rem"):仅渲染提示值,不参与求和与 sticky。 */
@@ -4172,6 +4206,8 @@ export declare const PAGE_TABLE_FILL_KEY = "tu-design:page-table-fill";
4172
4206
  * 列定义辅助:补全泛型推导,便于把列配置抽到独立文件。
4173
4207
  *
4174
4208
  * 纯类型辅助,原样返回入参——裸数组同样可直接传给 defineTable(无需此函数)。
4209
+ * @param columns - 列配置数组
4210
+ * @returns 原样返回的列配置数组
4175
4211
  */
4176
4212
  export declare function defineColumns<T extends DataRecord = DataRecord>(columns: TableColumnOptions<T>[]): TableColumnOptions<T>[];
4177
4213
  //#endregion
@@ -4181,6 +4217,8 @@ export declare function defineColumns<T extends DataRecord = DataRecord>(columns
4181
4217
  *
4182
4218
  * 返回值直接传给 `<TableRender :definition="def" />`;
4183
4219
  * 须在组件 setup 中调用(TanStack useVueTable 约束)。
4220
+ * @param config - 表格配置:列定义、数据源(静态 data 或服务端 onLoad)、分页排序、行选择等
4221
+ * @returns 表格渲染定义,直接传给 TableRender 组件的 definition prop
4184
4222
  */
4185
4223
  export declare function defineTable<T extends DataRecord>(config: DefineTableOptions<T>): TableRenderDefinition<T>;
4186
4224
  //#endregion
@@ -4190,6 +4228,9 @@ export declare function defineTable<T extends DataRecord>(config: DefineTableOpt
4190
4228
  *
4191
4229
  * 状态真相源是 TanStack 引擎(pageIndex 为 0-based),
4192
4230
  * `page`/`sort` 是对外的 1-based 只读投影,由 watch 同步。
4231
+ * @param options - 表格配置:列定义、数据源(静态 data 或服务端 onLoad)、分页排序、
4232
+ * 行选择、树形、列显隐、搜索表单等
4233
+ * @returns 表格渲染定义(含只读投影与实例动作),供 TableRender 组件消费
4193
4234
  */
4194
4235
  export declare function useTableRender<T extends DataRecord>(options: UseTableRenderOptions<T>): TableRenderDefinition<T>;
4195
4236
  //#endregion
@@ -4511,8 +4552,8 @@ declare const __VLS_export$7: import("vue").DefineComponent<__VLS_Props$1, {}, {
4511
4552
  "onUpdate:value"?: (value: number) => any;
4512
4553
  }>, {
4513
4554
  variant: ProgressVariant;
4514
- max: number;
4515
4555
  indeterminate: boolean;
4556
+ max: number;
4516
4557
  showValue: boolean;
4517
4558
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4518
4559
  declare const _default$35: typeof __VLS_export$7;
@@ -4535,8 +4576,8 @@ type __VLS_Slots$6 = {} & {
4535
4576
  };
4536
4577
  declare const __VLS_base$6: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
4537
4578
  size: "sm" | "default" | "lg";
4538
- spinning: boolean;
4539
4579
  label: string;
4580
+ spinning: boolean;
4540
4581
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4541
4582
  declare const __VLS_export$6: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
4542
4583
  declare const _default$41: typeof __VLS_export$6;
@@ -4551,41 +4592,104 @@ type ToastOptions = ToastOptions$1;
4551
4592
  type ToastPlacement = ToastPlacement$1;
4552
4593
  type ToastPromiseOptions<T> = ToastPromiseOptions$1<T>;
4553
4594
  declare const toastApi: {
4554
- /** 成功提示 */
4595
+ /**
4596
+ * 成功提示。
4597
+ * @param options - toast 配置(标题、描述、时长等)
4598
+ * @returns 该条 toast 的创建结果,可用于后续控制
4599
+ */
4555
4600
  success: (options: ToastOptions) => string;
4556
- /** 错误提示 */
4601
+ /**
4602
+ * 错误提示。
4603
+ * @param options - toast 配置(标题、描述、时长等)
4604
+ * @returns 该条 toast 的创建结果,可用于后续控制
4605
+ */
4557
4606
  error: (options: ToastOptions) => string;
4558
- /** 信息提示 */
4607
+ /**
4608
+ * 信息提示。
4609
+ * @param options - toast 配置(标题、描述、时长等)
4610
+ * @returns 该条 toast 的创建结果,可用于后续控制
4611
+ */
4559
4612
  info: (options: ToastOptions) => string;
4560
- /** 警告提示 */
4613
+ /**
4614
+ * 警告提示。
4615
+ * @param options - toast 配置(标题、描述、时长等)
4616
+ * @returns 该条 toast 的创建结果,可用于后续控制
4617
+ */
4561
4618
  warning: (options: ToastOptions) => string;
4562
- /** 加载中提示 */
4619
+ /**
4620
+ * 加载中提示。
4621
+ * @param options - toast 配置(标题、描述、时长等)
4622
+ * @returns 该条 toast 的创建结果,可用于后续控制
4623
+ */
4563
4624
  loading: (options: ToastOptions) => string;
4564
- /** 跟踪 Promise 状态的提示 */
4625
+ /**
4626
+ * 跟踪 Promise 状态的提示。
4627
+ * @param promise - 待跟踪的 Promise 或返回 Promise 的工厂函数
4628
+ * @param options - Promise 各阶段(loading/success/error)的 toast 配置
4629
+ * @param shared - 各阶段共享的基础配置(不含 type)
4630
+ * @returns 该条 toast 的创建结果,可用于后续控制
4631
+ */
4565
4632
  promise: <T>(promise: Promise<T> | (() => Promise<T>), options: ToastPromiseOptions$1<T>, shared?: Omit<ToastOptions, "type">) => {
4566
4633
  id: string | undefined;
4567
4634
  unwrap: () => Promise<T>;
4568
4635
  };
4569
- /** 关闭指定 toast;不传 id 时关闭全部 */
4636
+ /**
4637
+ * 关闭指定 toast;不传 id 时关闭全部。
4638
+ * @param id - 目标 toast 的 id;缺省时关闭全部
4639
+ */
4570
4640
  dismiss: (id?: string) => void;
4571
4641
  };
4642
+ /**
4643
+ * 获取 toast API。模块级单例外观对象,任意位置调用返回同一引用(引用稳定);
4644
+ * 内部转发到 Provider 挂载后重建的 store,调用前须在应用根部挂载 <ToastProvider>。
4645
+ * @returns toast 操作 API(success/error/info/warning/loading/promise/dismiss)
4646
+ */
4572
4647
  export declare function useToast(): {
4573
- /** 成功提示 */
4648
+ /**
4649
+ * 成功提示。
4650
+ * @param options - toast 配置(标题、描述、时长等)
4651
+ * @returns 该条 toast 的创建结果,可用于后续控制
4652
+ */
4574
4653
  success: (options: ToastOptions) => string;
4575
- /** 错误提示 */
4654
+ /**
4655
+ * 错误提示。
4656
+ * @param options - toast 配置(标题、描述、时长等)
4657
+ * @returns 该条 toast 的创建结果,可用于后续控制
4658
+ */
4576
4659
  error: (options: ToastOptions) => string;
4577
- /** 信息提示 */
4660
+ /**
4661
+ * 信息提示。
4662
+ * @param options - toast 配置(标题、描述、时长等)
4663
+ * @returns 该条 toast 的创建结果,可用于后续控制
4664
+ */
4578
4665
  info: (options: ToastOptions) => string;
4579
- /** 警告提示 */
4666
+ /**
4667
+ * 警告提示。
4668
+ * @param options - toast 配置(标题、描述、时长等)
4669
+ * @returns 该条 toast 的创建结果,可用于后续控制
4670
+ */
4580
4671
  warning: (options: ToastOptions) => string;
4581
- /** 加载中提示 */
4672
+ /**
4673
+ * 加载中提示。
4674
+ * @param options - toast 配置(标题、描述、时长等)
4675
+ * @returns 该条 toast 的创建结果,可用于后续控制
4676
+ */
4582
4677
  loading: (options: ToastOptions) => string;
4583
- /** 跟踪 Promise 状态的提示 */
4678
+ /**
4679
+ * 跟踪 Promise 状态的提示。
4680
+ * @param promise - 待跟踪的 Promise 或返回 Promise 的工厂函数
4681
+ * @param options - Promise 各阶段(loading/success/error)的 toast 配置
4682
+ * @param shared - 各阶段共享的基础配置(不含 type)
4683
+ * @returns 该条 toast 的创建结果,可用于后续控制
4684
+ */
4584
4685
  promise: <T>(promise: Promise<T> | (() => Promise<T>), options: ToastPromiseOptions$1<T>, shared?: Omit<ToastOptions, "type">) => {
4585
4686
  id: string | undefined;
4586
4687
  unwrap: () => Promise<T>;
4587
4688
  };
4588
- /** 关闭指定 toast;不传 id 时关闭全部 */
4689
+ /**
4690
+ * 关闭指定 toast;不传 id 时关闭全部。
4691
+ * @param id - 目标 toast 的 id;缺省时关闭全部
4692
+ */
4589
4693
  dismiss: (id?: string) => void;
4590
4694
  };
4591
4695
  type ToastApi = typeof toastApi;