@qin-ui/antd-vue-pro 2.4.4 → 2.5.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 (90) hide show
  1. package/AI-CONTEXT.md +26 -2
  2. package/README.md +44 -37
  3. package/api.json +24 -9
  4. package/es/antd-vue-pro.css +15 -15
  5. package/es/components/component-provider/components/index.vue.d.ts +3 -3
  6. package/es/components/component-provider/components/index.vue.d.ts.map +1 -1
  7. package/es/components/component-provider/constants/index.d.ts +20 -4
  8. package/es/components/component-provider/constants/index.d.ts.map +1 -1
  9. package/es/components/component-provider/types/index.d.ts +8 -4
  10. package/es/components/component-provider/types/index.d.ts.map +1 -1
  11. package/es/components/form/components/BaseField/index.vue.d.ts +7 -1
  12. package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -1
  13. package/es/components/form/components/BaseField/utils/index.d.ts +18 -0
  14. package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -1
  15. package/es/components/form/components/BaseFormItem/index.vue.d.ts +3 -0
  16. package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -1
  17. package/es/components/form/components/ContainerFragment/index.vue.d.ts +1 -0
  18. package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -1
  19. package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
  20. package/es/components/form/components/SlotComponent/index.vue.d.ts +1 -0
  21. package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -1
  22. package/es/components/form/components/index.d.ts +4 -0
  23. package/es/components/form/components/index.d.ts.map +1 -1
  24. package/es/components/form/constants/index.d.ts.map +1 -1
  25. package/es/components/form/hooks/useFields.d.ts +2 -0
  26. package/es/components/form/hooks/useFields.d.ts.map +1 -1
  27. package/es/components/form/hooks/useGroupFieldAttrs.d.ts +10 -0
  28. package/es/components/form/hooks/useGroupFieldAttrs.d.ts.map +1 -1
  29. package/es/components/form/index.d.ts +2 -2
  30. package/es/components/form/index.d.ts.map +1 -1
  31. package/es/components/form/types/index.d.ts +75 -44
  32. package/es/components/form/types/index.d.ts.map +1 -1
  33. package/es/components/form/utils/fieldKey.d.ts +13 -0
  34. package/es/components/form/utils/fieldKey.d.ts.map +1 -0
  35. package/es/components/table/components/ColumnControl.vue.d.ts +3 -0
  36. package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -1
  37. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -1
  38. package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -1
  39. package/es/components/table/components/ProTable.vue.d.ts +8 -1
  40. package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
  41. package/es/components/table/components/SearchForm.vue.d.ts +10 -2
  42. package/es/components/table/components/SearchForm.vue.d.ts.map +1 -1
  43. package/es/components/table/components/SizeControl.vue.d.ts +7 -2
  44. package/es/components/table/components/SizeControl.vue.d.ts.map +1 -1
  45. package/es/components/table/hooks/useTable.d.ts.map +1 -1
  46. package/es/components/table/index.d.ts +4 -1
  47. package/es/components/table/index.d.ts.map +1 -1
  48. package/es/components/table/types/index.d.ts +14 -6
  49. package/es/components/table/types/index.d.ts.map +1 -1
  50. package/es/index.d.ts +8 -4
  51. package/es/index.d.ts.map +1 -1
  52. package/es/index.js +528 -343
  53. package/es/index.js.map +1 -1
  54. package/es/locale/index.d.ts +2 -0
  55. package/es/locale/index.d.ts.map +1 -1
  56. package/es/shared/core/index.d.ts +1 -1
  57. package/es/shared/core/index.d.ts.map +1 -1
  58. package/es/shared/ui/index.d.ts +15 -3
  59. package/es/shared/ui/index.d.ts.map +1 -1
  60. package/package.json +7 -4
  61. package/src/components/component-provider/components/index.vue +26 -12
  62. package/src/components/component-provider/constants/index.ts +33 -6
  63. package/src/components/component-provider/types/index.ts +17 -9
  64. package/src/components/form/components/BaseField/index.vue +48 -16
  65. package/src/components/form/components/BaseField/utils/index.ts +19 -1
  66. package/src/components/form/components/BaseFormItem/index.vue +65 -17
  67. package/src/components/form/components/ContainerFragment/index.vue +3 -1
  68. package/src/components/form/components/ProForm/index.vue +30 -18
  69. package/src/components/form/components/SlotComponent/index.vue +14 -4
  70. package/src/components/form/components/index.ts +8 -1
  71. package/src/components/form/constants/index.ts +3 -4
  72. package/src/components/form/hooks/useFields.ts +3 -1
  73. package/src/components/form/hooks/useGroupFieldAttrs.ts +34 -27
  74. package/src/components/form/index.ts +1 -3
  75. package/src/components/form/types/index.ts +79 -46
  76. package/src/components/form/utils/fieldKey.ts +27 -0
  77. package/src/components/table/components/ColumnControl.vue +21 -5
  78. package/src/components/table/components/DefaultSearchFormContainer.vue +5 -0
  79. package/src/components/table/components/DefaultTableContainer.vue +5 -0
  80. package/src/components/table/components/ProTable.vue +239 -66
  81. package/src/components/table/components/SearchForm.vue +58 -21
  82. package/src/components/table/components/SizeControl.vue +21 -1
  83. package/src/components/table/hooks/useTable.ts +1 -1
  84. package/src/components/table/index.ts +8 -3
  85. package/src/components/table/types/index.ts +15 -7
  86. package/src/index.ts +12 -5
  87. package/src/locale/index.ts +2 -0
  88. package/src/shared/core/index.ts +11 -0
  89. package/src/shared/ui/index.ts +22 -4
  90. package/tsconfig.json +22 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAGjD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGjE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAEjD,uBAAuB;AACvB,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5D,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGjE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,mBAAmB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAG9E,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe,QAAQ,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { ColumnType } from '../../../shared/ui';
2
2
  import { Data, KeyExpandString, Paths, Path } from '../../../shared/core';
3
+ import { ComputedRef, MaybeRef } from 'vue';
4
+ type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
3
5
  /**
4
- * @qin-ui/antd-vue-pro 表格列配置类型
6
+ * 表格列配置类型
5
7
  *
6
8
  * @description 继承 Ant Design Vue 的 ColumnType 列类型,并添加:
7
9
  * - 类型安全的 dataIndex(基于泛型 D 推导路径),优先使用
@@ -33,7 +35,7 @@ import { Data, KeyExpandString, Paths, Path } from '../../../shared/core';
33
35
  */
34
36
  export type Column<D extends Data = Data> = Omit<ColumnType, 'dataIndex' | 'key'> & {
35
37
  /**
36
- * @description 列数据路径(主要字段)
38
+ * 列数据路径(主要字段)
37
39
  * 关联数据源中对应字段的路径,支持点号分隔的深层路径和数组路径。
38
40
  * 优先使用 dataIndex 进行字段匹配。
39
41
  *
@@ -41,19 +43,24 @@ export type Column<D extends Data = Data> = Omit<ColumnType, 'dataIndex' | 'key'
41
43
  */
42
44
  dataIndex?: KeyExpandString<Extract<keyof D, string>> | Paths<D>;
43
45
  /**
44
- * @description 列字段标识(辅助字段)
46
+ * 列字段标识(辅助字段)
45
47
  * 仅当 dataIndex 无法满足需求时使用,例如需要在自定义渲染中标识列时。
46
48
  * 在字段匹配时的优先级低于 dataIndex。
47
49
  */
48
50
  key?: Path<D>;
49
51
  /**
50
- * @description 是否隐藏该列
52
+ * 列是否隐藏;支持布尔、Ref 与 ComputedRef 形式,渲染期按 `toValue` 取值。
53
+ * 分组列的子列同样参与过滤(递归生效)。
51
54
  * @default false
52
55
  */
53
- hidden?: boolean;
56
+ hidden?: MaybeRefOrComputedRef<boolean>;
57
+ /**
58
+ * 分组子列;提供时该列作为分组表头渲染,子列沿用同一配置类型
59
+ */
60
+ children?: Column<D>[];
54
61
  };
55
62
  /**
56
- * @qin-ui/antd-vue-pro 表格列配置数组类型
63
+ * 表格列配置数组类型
57
64
  *
58
65
  * @template D - 表格行数据类型
59
66
  * @public
@@ -92,4 +99,5 @@ export type ColumnControlConfig<K extends string | number = string | number> = {
92
99
  /** 禁用全选/取消全选 */
93
100
  disableCheckAll?: boolean;
94
101
  };
102
+ export {};
95
103
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CAC9C,UAAU,EACV,WAAW,GAAG,KAAK,CACpB,GAAG;IACF;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,OAAO,C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AC,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CAC9C,UAAU,EACV,WAAW,GAAG,KAAK,CACpB,GAAG;IACF;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjE;;;;OAIG;IACH,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI;IAC7E,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACpC,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,sCAAsC;IACtC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,gBAAgB;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
package/es/index.d.ts CHANGED
@@ -24,7 +24,9 @@ export * from './locale';
24
24
  * <ProForm :form="form" />
25
25
  * </template>
26
26
  * ```
27
- *
27
+ */
28
+ export { ProForm };
29
+ /**
28
30
  * Schema 驱动的表格组件,基于 antd-vue Table 封装
29
31
  *
30
32
  * @description 通过声明式列配置即可生成功能完整的表格,
@@ -40,7 +42,9 @@ export * from './locale';
40
42
  * <ProTable :table="table" />
41
43
  * </template>
42
44
  * ```
43
- *
45
+ */
46
+ export { ProTable };
47
+ /**
44
48
  * 组件提供者,用于全局配置 ProForm 和 ProTable 的默认行为
45
49
  *
46
50
  * @description 通过 `ProComponentProvider` 包裹应用根组件,
@@ -55,10 +59,10 @@ export * from './locale';
55
59
  * </template>
56
60
  * ```
57
61
  */
58
- export { ProForm, ProTable, ProComponentProvider };
62
+ export { ProComponentProvider };
59
63
  declare const _default: {
60
64
  /**
61
- * @qin-ui/antd-vue-pro 安装方法
65
+ * 安装方法
62
66
  * @description 全局注册所有组件(ProForm、ProTable、ProComponentProvider)
63
67
  *
64
68
  * @param {App} app - Vue 应用实例
package/es/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;;IAEjD;;;;;;;;;;;;;OAaG;iBACU,GAAG;;AAflB,wBAoBE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AAEzB;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;;IAE9B;;;;;;;;;;;;;OAaG;iBACU,GAAG;;AAflB,wBAuBE"}