@qin-ui/element-plus-pro 1.0.8 → 1.1.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 (131) hide show
  1. package/AI-CONTEXT.md +49 -37
  2. package/LICENSE +9 -0
  3. package/api.json +44 -27
  4. package/bin/init-ai.mjs +0 -0
  5. package/es/component-provider/{index-Bmx9Q9Q-.js → index-BGGIWSkO.js} +2 -1
  6. package/es/component-provider/index-BGGIWSkO.js.map +1 -0
  7. package/es/component-provider/index.js +2 -1
  8. package/es/component-provider/index.js.map +1 -0
  9. package/es/components/component-provider/components/index.vue.d.ts +27 -0
  10. package/es/components/component-provider/components/index.vue.d.ts.map +1 -0
  11. package/es/components/component-provider/constants/index.d.ts +16 -0
  12. package/es/components/component-provider/constants/index.d.ts.map +1 -0
  13. package/es/components/component-provider/index.d.ts +4 -0
  14. package/es/components/component-provider/index.d.ts.map +1 -0
  15. package/es/components/component-provider/types/index.d.ts +35 -0
  16. package/es/components/component-provider/types/index.d.ts.map +1 -0
  17. package/es/components/form/components/BaseField/index.vue.d.ts +13 -0
  18. package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -0
  19. package/es/components/form/components/BaseField/utils/index.d.ts +3 -0
  20. package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -0
  21. package/es/components/form/components/BaseFormItem/index.vue.d.ts +9 -0
  22. package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -0
  23. package/es/components/form/components/ContainerFragment/index.vue.d.ts +23 -0
  24. package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -0
  25. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts +31 -0
  26. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts.map +1 -0
  27. package/es/components/form/components/PathProvider/index.vue.d.ts +24 -0
  28. package/es/components/form/components/PathProvider/index.vue.d.ts.map +1 -0
  29. package/es/components/form/components/ProForm/index.vue.d.ts +36 -0
  30. package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -0
  31. package/es/components/form/components/SlotComponent/index.vue.d.ts +7 -0
  32. package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -0
  33. package/es/components/form/components/index.d.ts +12 -0
  34. package/es/components/form/components/index.d.ts.map +1 -0
  35. package/es/components/form/constants/index.d.ts +67 -0
  36. package/es/components/form/constants/index.d.ts.map +1 -0
  37. package/es/components/form/hooks/index.d.ts +5 -0
  38. package/es/components/form/hooks/index.d.ts.map +1 -0
  39. package/es/components/form/hooks/useFields.d.ts +57 -0
  40. package/es/components/form/hooks/useFields.d.ts.map +1 -0
  41. package/es/components/form/hooks/useForm.d.ts +93 -0
  42. package/es/components/form/hooks/useForm.d.ts.map +1 -0
  43. package/es/components/form/hooks/useFormRef.d.ts +30 -0
  44. package/es/components/form/hooks/useFormRef.d.ts.map +1 -0
  45. package/es/components/form/index.d.ts +7 -0
  46. package/es/components/form/index.d.ts.map +1 -0
  47. package/es/components/form/types/index.d.ts +234 -0
  48. package/es/components/form/types/index.d.ts.map +1 -0
  49. package/es/components/table/components/ColumnControl.vue.d.ts +9 -0
  50. package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -0
  51. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts +18 -0
  52. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -0
  53. package/es/components/table/components/DefaultTableContainer.vue.d.ts +18 -0
  54. package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -0
  55. package/es/components/table/components/ProTable.vue.d.ts +47 -0
  56. package/es/components/table/components/ProTable.vue.d.ts.map +1 -0
  57. package/es/components/table/components/SearchForm.vue.d.ts +48 -0
  58. package/es/components/table/components/SearchForm.vue.d.ts.map +1 -0
  59. package/es/components/table/components/SizeControl.vue.d.ts +12 -0
  60. package/es/components/table/components/SizeControl.vue.d.ts.map +1 -0
  61. package/es/components/table/components/TableColumnRenderer.vue.d.ts +17 -0
  62. package/es/components/table/components/TableColumnRenderer.vue.d.ts.map +1 -0
  63. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts +3 -0
  64. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts.map +1 -0
  65. package/es/components/table/components/icons/DownOutlined.vue.d.ts +3 -0
  66. package/es/components/table/components/icons/DownOutlined.vue.d.ts.map +1 -0
  67. package/es/components/table/components/icons/FilterOutlined.vue.d.ts +3 -0
  68. package/es/components/table/components/icons/FilterOutlined.vue.d.ts.map +1 -0
  69. package/es/components/table/components/index.d.ts +5 -0
  70. package/es/components/table/components/index.d.ts.map +1 -0
  71. package/es/components/table/index.d.ts +33 -0
  72. package/es/components/table/index.d.ts.map +1 -0
  73. package/es/components/table/types/index.d.ts +67 -0
  74. package/es/components/table/types/index.d.ts.map +1 -0
  75. package/es/components/table/useTable.d.ts +111 -0
  76. package/es/components/table/useTable.d.ts.map +1 -0
  77. package/es/element-plus-pro.css +10 -10
  78. package/es/form/{index-D8btGgqa.js → index-oI6LGSpA.js} +13 -7
  79. package/es/form/index-oI6LGSpA.js.map +1 -0
  80. package/es/form/index.js +4 -3
  81. package/es/form/index.js.map +1 -0
  82. package/es/index.d.ts +76 -1472
  83. package/es/index.d.ts.map +1 -0
  84. package/es/index.js +14 -23
  85. package/es/index.js.map +1 -0
  86. package/es/shared/core/index.d.ts +6 -0
  87. package/es/shared/core/index.d.ts.map +1 -0
  88. package/es/shared/ui/index.d.ts +12 -0
  89. package/es/shared/ui/index.d.ts.map +1 -0
  90. package/es/table/index.js +10 -10
  91. package/es/table/index.js.map +1 -0
  92. package/package.json +10 -11
  93. package/src/components/component-provider/components/index.vue +67 -0
  94. package/src/components/component-provider/constants/index.ts +209 -0
  95. package/src/components/component-provider/index.ts +6 -0
  96. package/src/components/component-provider/types/index.ts +64 -0
  97. package/src/components/form/components/BaseField/index.vue +181 -0
  98. package/src/components/form/components/BaseField/utils/index.ts +15 -0
  99. package/src/components/form/components/BaseFormItem/index.vue +170 -0
  100. package/src/components/form/components/ContainerFragment/index.vue +24 -0
  101. package/src/components/form/components/GroupedFieldAttrs/index.vue +115 -0
  102. package/src/components/form/components/PathProvider/index.vue +19 -0
  103. package/src/components/form/components/ProForm/index.vue +106 -0
  104. package/src/components/form/components/SlotComponent/index.vue +26 -0
  105. package/src/components/form/components/index.ts +15 -0
  106. package/src/components/form/constants/index.ts +116 -0
  107. package/src/components/form/hooks/index.ts +5 -0
  108. package/src/components/form/hooks/useFields.ts +67 -0
  109. package/src/components/form/hooks/useForm.ts +110 -0
  110. package/src/components/form/hooks/useFormRef.ts +35 -0
  111. package/src/components/form/index.ts +29 -0
  112. package/src/components/form/types/index.ts +300 -0
  113. package/src/components/table/components/ColumnControl.vue +136 -0
  114. package/src/components/table/components/DefaultSearchFormContainer.vue +14 -0
  115. package/src/components/table/components/DefaultTableContainer.vue +14 -0
  116. package/src/components/table/components/ProTable.vue +420 -0
  117. package/src/components/table/components/SearchForm.vue +302 -0
  118. package/src/components/table/components/SizeControl.vue +55 -0
  119. package/src/components/table/components/TableColumnRenderer.vue +71 -0
  120. package/src/components/table/components/icons/ColumnHeightOutlined.vue +4 -0
  121. package/src/components/table/components/icons/DownOutlined.vue +4 -0
  122. package/src/components/table/components/icons/FilterOutlined.vue +4 -0
  123. package/src/components/table/components/index.ts +4 -0
  124. package/src/components/table/index.ts +38 -0
  125. package/src/components/table/types/index.ts +77 -0
  126. package/src/components/table/useTable.ts +144 -0
  127. package/src/index.ts +81 -0
  128. package/src/shared/core/index.ts +38 -0
  129. package/src/shared/ui/index.ts +106 -0
  130. package/es/core/index-C0Pbv44C.js +0 -360
  131. package/es/vendor/utils/lodash-es-p6jau26B.js +0 -1120
package/es/index.d.ts CHANGED
@@ -1,1472 +1,76 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { App } from 'vue';
3
- import { ColProps } from 'element-plus';
4
- import { Component } from 'vue';
5
- import { ComponentCustomProps } from 'vue';
6
- import { ComponentExposed } from 'vue-component-type-helpers';
7
- import { ComponentOptionsBase } from 'vue';
8
- import { ComponentOptionsMixin } from 'vue';
9
- import { ComponentProps } from 'vue-component-type-helpers';
10
- import { ComponentProvideOptions } from 'vue';
11
- import { ComponentPublicInstance } from 'vue';
12
- import { ComponentSize } from 'element-plus';
13
- import { ComponentSlots } from 'vue-component-type-helpers';
14
- import { ComputedRef } from 'vue';
15
- import { CreateComponentPublicInstanceWithMixins } from 'vue';
16
- import { CSSProperties } from 'vue';
17
- import { DefineComponent } from 'vue';
18
- import { ElAutocomplete } from 'element-plus';
19
- import { ElCascader } from 'element-plus';
20
- import { ElCheckboxGroup } from 'element-plus';
21
- import { ElDatePicker } from 'element-plus';
22
- import { ElFormItem } from 'element-plus';
23
- import { ElInput } from 'element-plus';
24
- import { ElInputNumber } from 'element-plus';
25
- import { ElRadioGroup } from 'element-plus';
26
- import { ElSelect } from 'element-plus';
27
- import { ElSlider } from 'element-plus';
28
- import { ElSwitch } from 'element-plus';
29
- import { ElTimePicker } from 'element-plus';
30
- import { ElTimeSelect } from 'element-plus';
31
- import { ElTransfer } from 'element-plus';
32
- import { ElTreeSelect } from 'element-plus';
33
- import { FormInstance } from 'element-plus';
34
- import { FormItemInstance } from 'element-plus';
35
- import { FormItemProps } from 'element-plus';
36
- import { FormProps } from 'element-plus';
37
- import { FormRules } from 'element-plus';
38
- import { GlobalComponents } from 'vue';
39
- import { GlobalDirectives } from 'vue';
40
- import { MaybeRef } from 'vue';
41
- import { PaginationProps } from 'element-plus';
42
- import { Plugin as Plugin_2 } from 'vue';
43
- import { PublicProps } from 'vue';
44
- import { Raw } from 'vue';
45
- import { Reactive } from 'vue';
46
- import { Ref } from 'vue';
47
- import { RowProps } from 'element-plus';
48
- import { ShallowUnwrapRef } from 'vue';
49
- import { Slot } from 'vue';
50
- import { TableColumnCtx } from 'element-plus';
51
- import { TableProps as TableProps_2 } from 'element-plus';
52
- import { VNode } from 'vue';
53
- import { VNodeProps } from 'vue';
54
-
55
- declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
56
-
57
- declare type __VLS_PrettifyLocal<T> = {
58
- [K in keyof T]: T[K];
59
- } & {};
60
-
61
- declare type __VLS_PrettifyLocal_2<T> = {
62
- [K in keyof T]: T[K];
63
- } & {};
64
-
65
- declare function __VLS_template(): {
66
- attrs: Partial<{}>;
67
- slots: {
68
- default?(_: {}): any;
69
- default?(_: {}): any;
70
- };
71
- refs: {};
72
- rootEl: any;
73
- };
74
-
75
- declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
76
-
77
- declare type __VLS_WithTemplateSlots<T, S> = T & {
78
- new (): {
79
- $slots: S;
80
- };
81
- };
82
-
83
- /**
84
- * FormItem 实例提供的额外方法
85
- * @template FormItemInstance - FormItem 组件实例类型
86
- */
87
- declare type AdditionalMethods<FormItemInstance> = {
88
- /**
89
- * @description 获取 FormItem 实例的方法
90
- */
91
- getFormItemRef?: () => FormItemInstance;
92
- /**
93
- * @description 获取传入 FormItem 组件的属性
94
- */
95
- getFormItemComputedProps?: () => Readonly<{
96
- [x: string]: any;
97
- }>;
98
- /**
99
- * @description 获取组件实例的方法
100
- */
101
- getComponentRef?: () => any;
102
- /**
103
- * @description 获取传入 Component 组件的属性
104
- */
105
- getComponentComputedProps?: () => Readonly<{
106
- disabled?: boolean;
107
- [x: string]: any;
108
- }>;
109
- };
110
-
111
- declare type AllowStringKey<T, Prefix extends string = ''> = {
112
- [K in keyof T as string extends K ? never : number extends K ? never : K extends string ? K : never]: T[K] extends (infer U)[] ? `${Prefix}${K & string}` | (IsRecord<U> extends true ? AllowStringKey<U, `${Prefix}${K & string}[index].`> : never) : IsRecord<T[K]> extends true ? `${Prefix}${K & string}` | AllowStringKey<T[K], `${Prefix}${K & string}.`> : `${Prefix}${K & string}`;
113
- } extends infer Obj ? Obj[keyof Obj] : never;
114
-
115
- /**
116
- * @type {Object} Base - 基础公共字段类型
117
- */
118
- declare type Base<D extends Data = Data> = BaseWithFields<D> | BaseWithoutFields<D>;
119
-
120
- /**
121
- * 基础表格列配置接口
122
- * @template D - 表格数据类型,应为一个对象类型
123
- *
124
- * @example
125
- * ```ts
126
- * interface User { name: string; age: number; address: { city: string } }
127
- *
128
- * // 简单列
129
- * const column: BaseColumn<User> = {
130
- * key: 'name',
131
- * title: '姓名',
132
- * }
133
- *
134
- * // 带数据索引和嵌套列
135
- * const column: BaseColumn<User> = {
136
- * key: 'address',
137
- * title: '地址',
138
- * children: [
139
- * { key: 'city', title: '城市' },
140
- * ],
141
- * }
142
- * ```
143
- */
144
- declare interface BaseColumn<D extends Data = Data> {
145
- /**
146
- * @description 列字段路径(数据对象的 key 路径),支持点号分隔的深层路径
147
- * @example 'name' | 'address.city'
148
- */
149
- key?: Path<D>;
150
- /**
151
- * @description 数据索引,与 key 作用类似,支持数组格式
152
- * @example 'name' | ['address', 'city']
153
- */
154
- dataIndex?: Path<D> | Path<D>[];
155
- /**
156
- * @description 嵌套子列配置,用于实现表头分组
157
- * @example [{ key: 'firstName', title: '名' }, { key: 'lastName', title: '姓' }]
158
- */
159
- children?: BaseColumn<D>[];
160
- /** 其他任意自定义属性(如 title、width、fixed 等 UI 属性) */
161
- [key: string]: any;
162
- }
163
-
164
- declare type BaseCommon<D extends Data = Data> = {
165
- /**
166
- * @description 字段标识namePath, 同prop
167
- * @example 'name' | 'age' | 'sex' | ...
168
- */
169
- path?: Path<D>;
170
- /**
171
- * @description 字段是否隐藏
172
- */
173
- hidden?: boolean;
174
- /**
175
- * @description 字段是否禁用
176
- */
177
- disabled?: boolean;
178
- /**
179
- * @description 字段中文名称,支持字符串或组件
180
- * @example '姓名' | '年龄' | '性别' | () => h('span', '自定义标签')
181
- */
182
- label?: SlotComponentType;
183
- /**
184
- * @description 字段插槽配置,可包含formItem插槽和component插槽
185
- * @example
186
- * ```js
187
- * slots: {
188
- * label: () => h('div', { style: { fontSize: '12px' } }, '年龄'),
189
- * addonAfter: '岁',
190
- * suffix: () => h('span', '元')
191
- * }
192
- * ```
193
- */
194
- slots?: Partial<ComponentSlots<typeof ElFormItem>>;
195
- /**
196
- * @description 字段formItem样式属性
197
- * @example { marginBottom: '8px', padding: '12px' }
198
- */
199
- formItemStyle?: CSSProperties;
200
- /**
201
- * @description 字段formItem样式类名
202
- * @example 'custom-form-item' | 'required-field'
203
- */
204
- formItemClass?: string;
205
- /**
206
- * @description 字段formItem容器包裹组件
207
- * @example (props, ctx) => h('div', { class: 'custom-container' }, ctx.slots.default?.())
208
- */
209
- formItemContainer?: ContainerComponent;
210
- /**
211
- * @description 将属性附加到 FormItem 的 DOM 节点
212
- * @example { 'data-form-item-test': 'test-value', 'aria-label': 'name' }
213
- */
214
- formItemDataAttrs?: Record<string, string>;
215
- /**
216
- * @description 额外的自定义属性,不会被当作组件参数,仅用做给字段添加标识属性等功能
217
- * @example { group: 'group-1' }
218
- */
219
- extraProps?: Record<string, any>;
220
- };
221
-
222
- /**
223
- * 内置组件映射表
224
- * @description Element Plus 内置支持的组件类型映射
225
- */
226
- declare type BaseComponentMap = {
227
- 'input': typeof ElInput;
228
- 'input-number': typeof ElInputNumber;
229
- 'autocomplete': typeof ElAutocomplete;
230
- 'select': typeof ElSelect;
231
- 'cascader': typeof ElCascader;
232
- 'date-picker': typeof ElDatePicker;
233
- 'time-picker': typeof ElTimePicker;
234
- 'time-select': typeof ElTimeSelect;
235
- 'checkbox-group': typeof ElCheckboxGroup;
236
- 'radio-group': typeof ElRadioGroup;
237
- 'switch': typeof ElSwitch;
238
- 'slider': typeof ElSlider;
239
- 'tree-select': typeof ElTreeSelect;
240
- 'transfer': typeof ElTransfer;
241
- };
242
-
243
- /**
244
- * 基础字段配置接口
245
- * @template D - 表单数据类型,应为一个对象类型
246
- *
247
- * @example
248
- * ```ts
249
- * // 简单的文本输入字段
250
- * const field: BaseField<{ name: string }> = {
251
- * path: 'name',
252
- * label: '姓名',
253
- * }
254
- *
255
- * // 带嵌套子字段
256
- * const field: BaseField<{ address: { city: string; street: string } }> = {
257
- * path: 'address',
258
- * label: '地址',
259
- * fields: [
260
- * { path: 'city', label: '城市' },
261
- * { path: 'street', label: '街道' },
262
- * ],
263
- * }
264
- * ```
265
- */
266
- declare interface BaseField<D extends Data = Data> {
267
- /**
268
- * @description 字段路径(数据对象的 key 路径),支持点号分隔的深层路径
269
- * @example 'name' | 'user.address.city'
270
- */
271
- path?: Path<D> | any;
272
- /**
273
- * @description 字段名称,与 path 作用相同,两者选其一即可
274
- * @deprecated 推荐使用 path 替代
275
- */
276
- name?: any;
277
- /**
278
- * @description 嵌套子字段配置数组,用于实现分组/嵌套字段
279
- * @example [{ path: 'firstName', label: '名' }, { path: 'lastName', label: '姓' }]
280
- */
281
- fields?: any[];
282
- /** 其他任意自定义属性 */
283
- [key: string]: any;
284
- }
285
-
286
- declare type BaseWithFields<D extends Data = Data> = BaseCommon<D> & {
287
- /**
288
- * @description 嵌套子字段配置
289
- * @example [{ key: 'firstName', label: '名' }, { key: 'lastName', label: '姓' }]
290
- */
291
- fields: Fields<D>;
292
- /**
293
- * @description 网格布局属性,true表示使用默认网格布局,针对具有嵌套字段的字段
294
- * @example boolean | { gutter: 24 }
295
- */
296
- grid?: Grid;
297
- component?: never;
298
- /**
299
- * @description 字段component样式属性
300
- * @example { width: '100%', borderColor: '#d9d9d9' }
301
- */
302
- componentStyle?: never;
303
- /**
304
- * @description 字段component样式类名
305
- * @example 'custom-input' | 'error-input'
306
- */
307
- componentClass?: never;
308
- /**
309
- * @description 字段component容器包裹组件
310
- * @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
311
- */
312
- componentContainer?: never;
313
- /**
314
- * @description 将属性附加到表单组件的 DOM 节点
315
- * @example { 'data-test': 'input-value', 'aria-label': 'name' }
316
- */
317
- componentDataAttrs?: never;
318
- /**
319
- * @description 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
320
- * @example (val) => val?.trim()
321
- */
322
- valueFormatter?: never;
323
- /**
324
- * @description 组件v-model双向绑定更新属性名,默认'modelValue'
325
- */
326
- modelProp?: never;
327
- };
328
-
329
- declare type BaseWithoutFields<D extends Data = Data> = BaseCommon<D> & {
330
- fields?: undefined;
331
- grid?: never;
332
- /**
333
- * @description 字段component样式属性
334
- * @example { width: '100%', borderColor: '#d9d9d9' }
335
- */
336
- componentStyle?: CSSProperties;
337
- /**
338
- * @description 字段component样式类名
339
- * @example 'custom-input' | 'error-input'
340
- */
341
- componentClass?: string;
342
- /**
343
- * @description 字段component容器包裹组件
344
- * @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
345
- */
346
- componentContainer?: ContainerComponent;
347
- /**
348
- * @description 将属性附加到表单组件的 DOM 节点
349
- * @example { 'data-test': 'input-value', 'aria-label': 'name' }
350
- */
351
- componentDataAttrs?: Record<string, string>;
352
- /**
353
- * @description 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
354
- * @example (val) => val?.trim()
355
- */
356
- valueFormatter?: ValueFormatter;
357
- /**
358
- * @description 组件v-model双向绑定更新属性名,默认'modelValue'
359
- */
360
- modelProp?: string;
361
- };
362
-
363
- declare type BivariantRender<D extends Data = Data> = {
364
- bivarianceHack(scope: ColumnScope<D>): any;
365
- }['bivarianceHack'];
366
-
367
- declare type ButtonProps = {
368
- onClick: () => void;
369
- };
370
-
371
- /**
372
- * @qin-ui/element-plus-pro 表格列配置类型
373
- *
374
- * @description 基于 Element Plus 的 ColumnType 列类型,并添加:
375
- * - prop 作为主要字段(Element Plus 使用 prop 而非 dataIndex)
376
- * - key 作为辅助标识
377
- * - hidden 属性
378
- * - render 自定义渲染函数
379
- *
380
- * @template D - 表格行数据类型
381
- *
382
- * @example
383
- * ```ts
384
- * interface User { name: string; age: number }
385
- *
386
- * const columns: Columns<User> = [
387
- * { prop: 'name', label: '姓名', width: 120 },
388
- * { prop: 'age', label: '年龄', width: 80 },
389
- * ]
390
- * ```
391
-
392
- * @public
393
- */
394
- export declare type Column<D extends Data = Data> = Partial<Omit<TableColumnCtx<any>, 'prop' | 'property' | 'children' | 'render'>> & {
395
- /** 列字段标识(辅助字段) */
396
- key?: Path<D>;
397
- /**
398
- * @description 列数据路径(主要字段)
399
- * Element Plus 使用 prop 而非 dataIndex
400
- * @example 'name' | 'address.city'
401
- */
402
- prop?: KeyExpandString<Extract<keyof D, string>> | Paths<D>;
403
- /** 是否隐藏该列 */
404
- hidden?: boolean;
405
- /** 自定义渲染函数 */
406
- render?: BivariantRender<D>;
407
- };
408
-
409
- /**
410
- * 列查找函数类型,通过自定义函数匹配列
411
- * @template D - 表格数据类型
412
- * @template C - 列配置类型
413
- *
414
- * @example
415
- * ```ts
416
- * // 查找 title 为 '姓名' 的列
417
- * const findBy: ColumnFindBy<MyData> = (column) => column.title === '姓名'
418
- *
419
- * // 查找所有宽度小于 100 的列
420
- * const findBy: ColumnFindBy<MyData> = (column) => column.width && column.width < 100
421
- * ```
422
- */
423
- declare type ColumnFindBy<D extends Data, C extends BaseColumn<D> = BaseColumn<D>> = (column: Readonly<C>) => boolean;
424
-
425
- /**
426
- * @qin-ui/element-plus-pro 表格列配置数组类型
427
- * @template D - 表格行数据类型
428
-
429
- * @public
430
- */
431
- export declare type Columns<D extends Data = Data> = Array<Column<D>>;
432
-
433
- /**
434
- * 列配置数组类型
435
- * @template D - 表格数据类型
436
- * @template C - 列配置类型
437
- */
438
- declare type Columns_2<D extends Data = Data, C extends BaseColumn<D> = BaseColumn<D>> = Array<C>;
439
-
440
- /**
441
- * Element Plus 表格列作用域
442
- * @template D - 表格行数据类型
443
-
444
- * @public
445
- */
446
- declare type ColumnScope<D extends Data = Data> = {
447
- /** 当前行数据 */
448
- row: ExtendWithAny<D>;
449
- /** 当前列配置 */
450
- column: Column<D>;
451
- /** 行索引 */
452
- $index: number;
453
- /** 单元格值 */
454
- cellValue: any;
455
- };
456
-
457
- /**
458
- * 组件映射扩展接口
459
- * @description 暴露给外部扩充自定义组件类型的接口。
460
- * 用户可通过 TypeScript 的声明合并(module augmentation)添加自定义组件。
461
- *
462
- * @example
463
- * ```ts
464
- * declare module '@qin-ui/element-plus-pro' {
465
- * interface ComponentMap {
466
- * 'my-custom-input': typeof MyCustomInput;
467
- * }
468
- * }
469
- * ```
470
-
471
- * @public
472
- */
473
- export declare interface ComponentMap {
474
- }
475
-
476
- /**
477
- * 组件名称联合类型
478
- * @description 所有支持的组件名称
479
-
480
- * @public
481
- */
482
- export declare type ComponentName = keyof BaseComponentMap | keyof ComponentMap | 'custom';
483
-
484
- export declare type ComponentVars = Partial<RequiredComponentVars>;
485
-
486
- /**
487
- * @description 容器组件类型
488
- */
489
- declare type ContainerComponent = Component<PathProps>;
490
-
491
- export declare const ContainerFragment: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
492
-
493
- declare type Control = {
494
- sizeControl: boolean;
495
- columnControl: boolean;
496
- };
497
-
498
- /**
499
- * 基础数据类型,表示任意对象
500
- * @description 所有表单数据对象和表格数据对象的基础类型
501
- */
502
- declare type Data = Record<string, any>;
503
-
504
- declare type DatePickerType = NonNullable<ComponentProps<typeof ElDatePicker>['type']>;
505
-
506
- /**
507
- * 递归地将对象的所有属性变为可选
508
- * @template T - 原始类型
509
- *
510
- * @example
511
- * ```ts
512
- * type T = DeepPartial<{ name: string; address: { city: string } }>
513
- * // { name?: string; address?: { city?: string } }
514
- * ```
515
- */
516
- declare type DeepPartial<T> = T extends object ? {
517
- [P in keyof T]?: DeepPartial<T[P]>;
518
- } : T;
519
-
520
- declare const _default: {
521
- /**
522
- * @qin-ui/element-plus-pro 安装方法
523
- * @description 全局注册所有组件(ProForm、ProTable、ProComponentProvider)
524
- *
525
- * @param {App} app - Vue 应用实例
526
- *
527
- * @example
528
- * ```ts
529
- * import { createApp } from 'vue'
530
- * import QinUI from '@qin-ui/element-plus-pro'
531
- * const app = createApp(App)
532
- * app.use(QinUI)
533
- * ```
534
- */
535
- install(app: App): void;
536
- };
537
- export default _default;
538
-
539
- declare const _default_2: <T extends Table<any> = Table>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
540
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
541
- readonly "onUpdate:size"?: ((value: "" | "default" | "large" | "small" | undefined) => any) | undefined;
542
- readonly "onUpdate:loading"?: ((value: boolean) => any) | undefined;
543
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onUpdate:size" | "onUpdate:loading"> & ({
544
- size?: TableProps["size"];
545
- loading?: boolean;
546
- } & {
547
- table?: T;
548
- search?: () => Promise<unknown>;
549
- addIndexColumn?: boolean;
550
- immediateSearch?: boolean;
551
- control?: boolean | Partial<{
552
- sizeControl: boolean;
553
- columnControl: boolean;
554
- }>;
555
- searchFormConfig?: Omit<SearchFormProps, "form"> & {
556
- hidden?: boolean;
557
- container?: ContainerComponent | false;
558
- };
559
- tableContainer?: ContainerComponent | false;
560
- columns?: Columns<T extends Table<any, infer R extends Data> ? R : any>;
561
- data?: (T extends Table<any, infer R extends Data> ? R : any)[];
562
- pagination?: false | Partial<PaginationProps>;
563
- } & Omit<TableProps, "data">) & Partial<{}>> & PublicProps;
564
- expose(exposed: ShallowUnwrapRef< {}>): void;
565
- attrs: any;
566
- slots: Partial<Record<string, (_: any) => any>> & {
567
- 'search-form'?(_: {}): any;
568
- 'button-bar'?(_: {}): any;
569
- toolbar?(_: {}): any;
570
- table?(_: {}): any;
571
- };
572
- emit: ((evt: "update:size", value: "" | "default" | "large" | "small" | undefined) => void) & ((evt: "update:loading", value: boolean) => void);
573
- }>) => VNode & {
574
- __ctx?: Awaited<typeof __VLS_setup>;
575
- };
576
-
577
- declare const _default_3: <F extends Form<any> = Form>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal_2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
578
- props: __VLS_PrettifyLocal_2<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ({
579
- grid?: Grid;
580
- form?: F;
581
- } & Partial<Omit<FormProps, "model">>) & Partial<{}>> & PublicProps;
582
- expose(exposed: ShallowUnwrapRef< {}>): void;
583
- attrs: any;
584
- slots: Readonly<Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
585
- path?: string;
586
- } & Data & {
587
- [x: string]: any;
588
- disabled?: boolean;
589
- }>> & {
590
- default: Slot;
591
- }>> & Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
592
- path?: string;
593
- } & Data & {
594
- [x: string]: any;
595
- disabled?: boolean;
596
- }>> & {
597
- default: Slot;
598
- }>;
599
- emit: {};
600
- }>) => VNode & {
601
- __ctx?: Awaited<typeof __VLS_setup>;
602
- };
603
-
604
- declare const _default_4: DefineComponent<Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_3> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
605
-
606
- declare type Expand = {
607
- minExpandRows?: number;
608
- expandStatus?: boolean;
609
- };
610
-
611
- declare type ExpandButtonProps = ButtonProps & {
612
- expandStatus: boolean;
613
- };
614
-
615
- /**
616
- * 用 Record<string, any> 扩展对象类型,保留所有原始属性结构,
617
- * 同时允许访问任意字符串 key。
618
- * @template D - 原始对象类型
619
- *
620
- * @example
621
- * ```ts
622
- * type T = ExtendWithAny<{ name: string; age: number }>
623
- * // { name: string; age: number } & Record<string, any>
624
- * // 可访问任意额外属性: obj.anyKey
625
- * ```
626
- */
627
- declare type ExtendWithAny<D> = {
628
- [K in keyof D]: IsRecord<D[K]> extends true ? ExtendWithAny<D[K]> : D[K];
629
- } & Record<string, any>;
630
-
631
- /**
632
- * @description 字段配置类型,包含所有字段属性和响应式支持
633
- * @template D - 数据对象类型
634
-
635
- * @public
636
- */
637
- export declare type Field<C extends ComponentName = ComponentName, D extends Data = Data> = (FieldTypeMap<D>[C] & {
638
- component?: C extends 'custom' ? FieldTypeMap<D>[C]['component'] : C;
639
- }) | WithFields<D>;
640
-
641
- /**
642
- * 字段查找函数类型,通过自定义函数匹配字段
643
- * @template D - 表单数据类型
644
- * @template F - 字段配置类型
645
- * @example
646
- * ```ts
647
- * // 查找 label 为 '姓名' 的字段
648
- * const findBy: FieldFindBy<MyData> = (field) => field.label === '姓名'
649
- * ```
650
- */
651
- declare type FieldFindBy<D extends Data, F extends BaseField<D> = BaseField<D>> = (field: Readonly<F>) => boolean;
652
-
653
- /**
654
- * @description 字段数组类型
655
- * @template D - 数据对象类型
656
-
657
- * @public
658
- */
659
- export declare type Fields<D extends Data = Data> = Array<Field<ComponentName, D>>;
660
-
661
- /**
662
- * @type {FieldTypeMap} 字段类型集合
663
- */
664
- declare type FieldTypeMap<D extends Data = Data> = {
665
- [K in ComponentName]: K extends 'custom' ? WithCommon<{
666
- slots?: Slots;
667
- [x: string]: any;
668
- }, D> & {
669
- component?: RenderComponentType | Raw<RenderComponentType>;
670
- } : WithComponent<GetComponentType<K>, D> & {
671
- component?: K;
672
- };
673
- };
674
-
675
- /**
676
- * @qin-ui/element-plus-pro 的表单实例类型
677
- *
678
- * @description 在 core Form 类型的基础上:
679
- * 1. 将字段类型 F 默认绑定为本地 Field<ComponentName, D>,支持 Element Plus 所有内置组件类型
680
- * 2. 将底层表单实例 I 绑定为 Element Plus 的 FormInstance,使 formRef 获得完整的类型提示
681
- *
682
- * @template D - 表单数据类型
683
- * @template F - 字段配置类型
684
-
685
- * @public
686
- */
687
- export declare type Form<D extends Data = Data, F extends Field<ComponentName, D> = Field<ComponentName, D>> = Form_2<D, F, FormInstance>;
688
-
689
- /**
690
- * 表单实例类型
691
- * @template D - 表单数据类型
692
- * @template F - 字段配置类型
693
- * @template I - 底层 UI 框架 Form 组件实例类型
694
- *
695
- * 组合了表单数据操作、字段操作和表单 ref 操作的能力。
696
- *
697
- * @example
698
- * ```ts
699
- * // 定义数据类型
700
- * interface User {
701
- * name: string
702
- * age: number
703
- * address: { city: string; street: string }
704
- * }
705
- *
706
- * // 创建表单实例
707
- * const form: Form<User> = useForm({
708
- * name: '张三',
709
- * age: 25,
710
- * })
711
- *
712
- * // 读取数据
713
- * form.getFormData('name') // '张三'
714
- * form.getFormData('address.city') // 支持深层路径
715
- *
716
- * // 设置数据
717
- * form.setFormData('name', '李四')
718
- * form.setFormData({ name: '王五', age: 30 }) // 批量设置
719
- *
720
- * // 字段操作
721
- * form.getField('name') // 获取字段配置
722
- * form.setField('name', { label: '用户名' }) // 更新字段配置
723
- * ```
724
- */
725
- declare type Form_2<D extends Data = Data, F extends BaseField<D> = BaseField<D>, I = any> = ReturnType<typeof useFormData<D>> & ReturnType<typeof useFields_2<D, F>> & ReturnType<typeof useFormRef_2<I>>;
726
-
727
- declare type _FormProps = Pick<Partial<FormProps>, 'disabled' | 'labelPosition' | 'labelWidth' | 'inline' | 'inlineMessage' | 'statusIcon' | 'showMessage' | 'size'>;
728
-
729
- declare type FP<T extends Record<string, any>> = Partial<T & Pick<Base, 'valueFormatter' | 'componentContainer' | 'modelProp' | 'componentClass' | 'componentStyle'> & AllowedComponentProps>;
730
-
731
- /**
732
- * 根据组件名获取组件类型
733
- * @template K - 组件名称
734
- */
735
- declare type GetComponentType<K extends ComponentName> = K extends keyof ComponentMap ? ComponentMap[K] : K extends keyof BaseComponentMap ? BaseComponentMap[K] : never;
736
-
737
- declare type Grid = boolean | (RowProps & {});
738
-
739
- /**
740
- * 判断类型是否为对象(排除函数、数组和 null)
741
- * @template T - 要判断的类型
742
- */
743
- declare type IsRecord<T> = T extends object ? T extends ((...args: any[]) => any) | any[] | null ? false : true : false;
744
-
745
- declare type JoinPath<Prefix extends any[], Key extends PropertyKey> = [
746
- ...Prefix,
747
- KeyExpandString<Extract<Key, string>>
748
- ];
749
-
750
- /**
751
- * 展开字符串联合类型,保留字符串字面量,同时兼容 string
752
- * @template T - 字符串字面量类型
753
- */
754
- declare type KeyExpandString<T extends string> = T | (string & {});
755
-
756
- /**
757
- * 点号分隔的路径字符串类型
758
- * @template D - 数据对象类型
759
- *
760
- * @description 用于类型安全地表示深层对象属性的路径。
761
- * 例如给定 `{ user: { name: string; address: { city: string } } }`,
762
- * 路径值可以是 `'user'`、`'user.name'`、`'user.address.city'`。
763
- *
764
- * 同时兼容 string 类型,用于运行时动态路径。
765
- *
766
- * @example
767
- * ```ts
768
- * interface User {
769
- * name: string
770
- * age: number
771
- * address: { city: string; street: string }
772
- * }
773
- *
774
- * type P = KeyPathString<User>
775
- * // 'name' | 'age' | 'address' | 'address.city' | 'address.street' | string
776
- * ```
777
- */
778
- declare type KeyPathString<D extends Data> = KeyExpandString<AllowStringKey<D>>;
779
-
780
- declare type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
781
-
782
- /**
783
- * @description 不支持响应式的属性名
784
- */
785
- declare type NotSupportedRefOrGetterProps = 'component' | 'formItemContainer' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelProp';
786
-
787
- /**
788
- * 分页参数
789
- *
790
- * @example
791
- * ```ts
792
- * const pageParam: PageParam = {
793
- * current: 1,
794
- * pageSize: 10,
795
- * total: 100,
796
- * }
797
- * ```
798
- */
799
- declare interface PageParam {
800
- /** 当前页码 */
801
- current: number;
802
- /** 每页条数 */
803
- pageSize: number;
804
- /** 总记录数 */
805
- total: number;
806
- /** 其他自定义分页属性 */
807
- [key: string]: any;
808
- }
809
-
810
- /**
811
- * 路径类型,用于类型安全的深层属性访问
812
- * @template D - 数据对象类型
813
- *
814
- * @description 提供对数据对象的深层路径的类型推导。
815
- * 在 useFormData、useFields 等 API 中作为 path 参数的类型。
816
- *
817
- * @example
818
- * ```ts
819
- * interface User { name: string; address: { city: string } }
820
- *
821
- * // 类型安全的路径
822
- * const path: Path<User> = 'address.city' // ✅
823
- * const path: Path<User> = 'invalid.path' // ❌ 类型错误
824
- * ```
825
- */
826
- declare type Path<D extends Data = Data> = KeyPathString<D>;
827
-
828
- declare type PathProps = {
829
- path?: string;
830
- } & Data;
831
-
832
- /**
833
- * 路径数组类型(Path 的数组表示)
834
- * @template T - 数据对象类型
835
- * @template Prefix - 前缀路径数组(内部递归使用)
836
- *
837
- * @description 与 Path 类似,但以元组数组形式表示路径。
838
- *
839
- * @example
840
- * ```ts
841
- * interface User { name: string; address: { city: string } }
842
- *
843
- * type P = Paths<User>
844
- * // ['name'] | ['address'] | ['address', 'city']
845
- * ```
846
- */
847
- declare type Paths<T, Prefix extends any[] = []> = T extends object ? {
848
- [K in keyof T]: IsRecord<T[K]> extends true ? JoinPath<Prefix, K> | Paths<T[K], JoinPath<Prefix, K>> : JoinPath<Prefix, K>;
849
- }[keyof T] : never;
850
-
851
- declare type PP<T extends Record<string, any>> = Partial<T & AllowedComponentProps>;
852
-
853
- export declare const ProComponentProvider: SFCWithInstall<{
854
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
855
- componentVars?: ComponentVars;
856
- componentMap?: Partial<Record<ComponentName, any>>;
857
- }> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
858
- P: {};
859
- B: {};
860
- D: {};
861
- C: {};
862
- M: {};
863
- Defaults: {};
864
- }, Readonly<{
865
- componentVars?: ComponentVars;
866
- componentMap?: Partial<Record<ComponentName, any>>;
867
- }> & Readonly<{}>, {}, {}, {}, {}, {}>;
868
- __isFragment?: never;
869
- __isTeleport?: never;
870
- __isSuspense?: never;
871
- } & ComponentOptionsBase<Readonly<{
872
- componentVars?: ComponentVars;
873
- componentMap?: Partial<Record<ComponentName, any>>;
874
- }> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
875
- $slots: {
876
- default?(_: {}): any;
877
- };
878
- })>;
879
-
880
- export declare const ProForm: SFCWithInstall<(<F extends Form<any> = Form>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
881
- slots: Readonly<Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
882
- path?: string;
883
- } & Data & {
884
- [x: string]: any;
885
- disabled?: boolean;
886
- }>> & {
887
- default: Slot;
888
- }>> & Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
889
- path?: string;
890
- } & Data & {
891
- [x: string]: any;
892
- disabled?: boolean;
893
- }>> & {
894
- default: Slot;
895
- }>;
896
- attrs: any;
897
- emit: {};
898
- }, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
899
- props: {
900
- grid?: Grid | undefined;
901
- form?: F | undefined;
902
- size?: ComponentSize | undefined;
903
- disabled?: boolean | undefined;
904
- labelWidth?: string | number | undefined;
905
- labelPosition?: "left" | "right" | "top" | undefined;
906
- rules?: FormRules | undefined;
907
- inlineMessage?: boolean | undefined;
908
- showMessage?: boolean | undefined;
909
- requireAsteriskPosition?: "left" | "right" | undefined;
910
- labelSuffix?: string | undefined;
911
- inline?: boolean | undefined;
912
- statusIcon?: boolean | undefined;
913
- validateOnRuleChange?: boolean | undefined;
914
- hideRequiredAsterisk?: boolean | undefined;
915
- scrollToError?: boolean | undefined;
916
- scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
917
- } & PublicProps;
918
- expose(exposed: ShallowUnwrapRef< {}>): void;
919
- attrs: any;
920
- slots: Readonly<Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
921
- path?: string;
922
- } & Data & {
923
- [x: string]: any;
924
- disabled?: boolean;
925
- }>> & {
926
- default: Slot;
927
- }>> & Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
928
- path?: string;
929
- } & Data & {
930
- [x: string]: any;
931
- disabled?: boolean;
932
- }>> & {
933
- default: Slot;
934
- }>;
935
- emit: {};
936
- }>) => VNode & {
937
- __ctx?: Awaited<typeof __VLS_setup>;
938
- })>;
939
-
940
- export declare type ProFormInstance = ComponentExposed<typeof _default_3>;
941
-
942
- export declare type ProFormItemInstance = ComponentExposed<typeof _default_4>;
943
-
944
- export declare type ProFormItemProps = ComponentProps<typeof _default_4>;
945
-
946
- export declare type ProFormProps = ComponentProps<typeof _default_3>;
947
-
948
- declare type Props = {
949
- component?: ContainerComponent;
950
- };
951
-
952
- declare type Props_2 = {
953
- component?: SlotComponentType;
954
- };
955
-
956
- declare type Props_3 = {
957
- grid?: Grid;
958
- fields?: Fields;
959
- disabled?: boolean;
960
- };
961
-
962
- export declare const ProTable: typeof _default_2;
963
-
964
- export declare type ProTableInstance = ComponentPublicInstance;
965
-
966
- export declare type ProTableProps<T extends Table<any> = Table> = {
967
- table?: T;
968
- search?: () => Promise<unknown>;
969
- addIndexColumn?: boolean;
970
- immediateSearch?: boolean;
971
- control?: boolean | Partial<Control>;
972
- searchFormConfig?: SearchFormConfig;
973
- tableContainer?: ContainerComponent | false;
974
- columns?: Columns<ReturnTableRecord<T>>;
975
- data?: ReturnTableRecord<T>[];
976
- pagination?: false | Partial<PaginationProps>;
977
- } & Omit<TableProps, 'data'>;
978
-
979
- /**
980
- * @description 自定义组件
981
- * @example (p, ctx) => h('div', ctx.attrs)
982
- */
983
- declare type RenderComponentType = Component<VModelProps & PathProps>;
984
-
985
- declare type RequiredComponentVars = {
986
- 'pro-table': PP<TableProps & {
987
- pagination?: Partial<PaginationProps>;
988
- control?: boolean | {
989
- sizeControl?: boolean;
990
- columnControl?: boolean;
991
- };
992
- searchFormConfig?: any;
993
- immediateSearch?: boolean;
994
- addIndexColumn?: boolean;
995
- tableContainer?: any;
996
- }>;
997
- 'pro-form': PP<Omit<ProFormProps, 'form' | 'grid'> & {
998
- grid: Exclude<Grid, undefined | boolean>;
999
- }>;
1000
- 'pro-form-item': PP<FormItemProps & Pick<ColProps, 'span' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'> & Pick<Base, 'formItemContainer'>>;
1001
- 'input.password': FP<ComponentProps<GetComponentType<'input'>>>;
1002
- 'input.textarea': FP<ComponentProps<GetComponentType<'input'>>>;
1003
- } & {
1004
- [K in DatePickerType as `date-picker.${K}`]: FP<ComponentProps<GetComponentType<'date-picker'>>>;
1005
- } & {
1006
- [K in Exclude<ComponentName, 'custom'>]: FP<ComponentProps<GetComponentType<K>>>;
1007
- };
1008
-
1009
- declare type ReturnTableRecord<V> = V extends Table<any, infer R> ? R : any;
1010
-
1011
- declare type SearchFormConfig = Omit<SearchFormProps, 'form'> & {
1012
- hidden?: boolean;
1013
- container?: ContainerComponent | false;
1014
- };
1015
-
1016
- declare type SearchFormProps = {
1017
- form: Form;
1018
- layout?: 'grid' | 'inline';
1019
- expand?: boolean | Expand;
1020
- searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
1021
- resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
1022
- expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
1023
- rowGap?: number;
1024
- columnGap?: number;
1025
- } & /* @vue-ignore */ _FormProps & AllowedComponentProps;
1026
-
1027
- declare type SetColumn<T extends Data = Data, C extends BaseColumn<T> = BaseColumn<T>> = (key: Path<T>, column: C | ((pre: Readonly<C>) => C), options?: {
1028
- updateType?: 'rewrite' | 'merge';
1029
- } & UpdateColumnOptions) => void;
1030
-
1031
- declare type SetPageParam = (pageParam: Partial<PageParam> | ((pre: Readonly<PageParam>) => Partial<PageParam>)) => void;
1032
-
1033
- declare type SFCWithInstall<T> = T & Plugin_2;
1034
-
1035
- export declare const SlotComponent: DefineComponent<Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1036
-
1037
- /**
1038
- * @description 插槽组件类型
1039
- */
1040
- declare type SlotComponentType = Component<PathProps> | VNode | string | number | boolean | null | undefined | ((...args: any[]) => SlotComponentType);
1041
-
1042
- /**
1043
- * @description 插槽对象类型
1044
- */
1045
- declare type Slots = {
1046
- [name: string]: SlotComponentType;
1047
- };
1048
-
1049
- /**
1050
- * @qin-ui/element-plus-pro 的表格实例类型
1051
- *
1052
- * @description 在 core Table 类型的基础上:
1053
- * 1. 将列类型 C 绑定为本地 Column<T>
1054
- * 2. 将 dataSource 重命名为 data(Element Plus 使用 data 而非 dataSource)
1055
- *
1056
- * @template D - 搜索表单数据类型
1057
- * @template T - 表格行数据类型
1058
-
1059
- * @public
1060
- */
1061
- export declare type Table<D extends Data = Data, T extends Data = ExtendWithAny<D>> = Omit<Table_2<D, T, Column<T>>, 'dataSource'> & {
1062
- /**
1063
- * Element Plus 数据源(与 core 的 dataSource 对应)
1064
- */
1065
- data: Ref<T[]>;
1066
- };
1067
-
1068
- /**
1069
- * 表格实例类型
1070
- * @template D - 搜索表单数据类型
1071
- * @template T - 表格数据类型(表格行数据类型),默认为 ExtendWithAny<D>
1072
- * @template C - 列配置类型,继承自 BaseColumn<T>
1073
- *
1074
- * 组合了列操作、数据源管理、分页管理和搜索表单的能力。
1075
- *
1076
- * @example
1077
- * ```ts
1078
- * interface User { name: string; age: number; }
1079
- * interface SearchParams { keyword: string }
1080
- *
1081
- * const table: Table<SearchParams, User> = useTable({
1082
- * columns: [
1083
- * { key: 'name', title: '姓名' },
1084
- * { key: 'age', title: '年龄' },
1085
- * ],
1086
- * dataSource: [
1087
- * { name: '张三', age: 25 },
1088
- * ],
1089
- * searchFields: [
1090
- * { path: 'keyword', label: '关键词', component: 'input' },
1091
- * ],
1092
- * })
1093
- *
1094
- * // 列操作
1095
- * table.setColumn('name', { title: '用户名' })
1096
- * table.appendColumn('name', { key: 'email', title: '邮箱' })
1097
- * table.deleteColumn('age')
1098
- *
1099
- * // 分页操作
1100
- * table.setPageParam({ current: 2, pageSize: 20 })
1101
- * table.resetQueryParams()
1102
- *
1103
- * // 搜索表单
1104
- * table.searchForm.getFormData('keyword')
1105
- * table.searchForm.setFormData('keyword', '张三')
1106
- * ```
1107
- */
1108
- declare type Table_2<D extends Data = Data, T extends Data = ExtendWithAny<D>, C extends BaseColumn<T> = BaseColumn<T>> = {
1109
- /** 列配置数组(响应式) */
1110
- columns: Ref<Columns_2<T, C>>;
1111
- /** 数据源数组(响应式) */
1112
- dataSource: Ref<T[]>;
1113
- /** 分页参数(响应式) */
1114
- pageParam: Reactive<PageParam>;
1115
- /** 搜索表单实例 */
1116
- searchForm: Form_2<D>;
1117
- /** 设置列配置 */
1118
- setColumn: SetColumn<T, C>;
1119
- /** 删除列 */
1120
- deleteColumn: (path: Path<T> | ColumnFindBy<T, C>, options?: UpdateColumnOptions) => void;
1121
- /** 在指定列后追加列 */
1122
- appendColumn: (path: Path<T> | ColumnFindBy<T, C> | undefined, column: C | Columns_2<T, C>, options?: UpdateColumnOptions) => void;
1123
- /** 在指定列前插入列 */
1124
- prependColumn: (path: Path<T> | ColumnFindBy<T, C> | undefined, column: C | Columns_2<T, C>, options?: UpdateColumnOptions) => void;
1125
- /** 设置分页参数 */
1126
- setPageParam: SetPageParam;
1127
- /** 重置查询参数(重置分页和搜索条件到初始值) */
1128
- resetQueryParams: () => void;
1129
- };
1130
-
1131
- declare type TableProps = TableProps_2<any>;
1132
-
1133
- /**
1134
- * 列更新选项
1135
- */
1136
- declare type UpdateColumnOptions = {
1137
- /**
1138
- * @description 是否更新所有匹配的列
1139
- * - true: 更新所有匹配的列
1140
- * - false/undefined: 只更新第一个匹配的列
1141
- */
1142
- all?: boolean;
1143
- };
1144
-
1145
- declare type UpdateFieldOptions = {
1146
- all?: boolean;
1147
- };
1148
-
1149
- /** useFields 返回值类型,固定为本地 Fields<D>
1150
- * @public
1151
- */
1152
- export declare type UseFields<D extends Data = Data> = ReturnType<typeof useFields<D>>;
1153
-
1154
- /**
1155
- * @qin-ui/element-plus-pro 的字段配置管理 Hook
1156
- *
1157
- * @description 类型安全的 re-export。将 core useFields 的泛型参数绑定为本地类型:
1158
- * - 字段类型 F → Field<ComponentName, D>(支持 Element Plus 组件类型推导)
1159
- * - FormItem 实例 → Element Plus 的 FormItemInstance
1160
- *
1161
- * @template D - 表单数据类型
1162
- *
1163
- * @example
1164
- * ```ts
1165
- * interface User { name: string; age: number }
1166
- *
1167
- * const { fields, getField, setField } = useFields<User>([
1168
- * { path: 'name', label: '姓名', component: 'input' },
1169
- * { path: 'age', label: '年龄', component: 'input-number' },
1170
- * ])
1171
- * ```
1172
-
1173
- * @public
1174
- */
1175
- export declare const useFields: {
1176
- <D extends Data = Data>(initFields?: Fields<D>): ReturnType<typeof useFields_2<D, Field<ComponentName, D>, FormItemInstance>>;
1177
- };
1178
-
1179
- /**
1180
- * 字段配置管理 Hook
1181
- *
1182
- * @description 提供对字段配置数组的增删改查操作,支持:
1183
- * - 通过路径字符串或查找函数定位字段
1184
- * - 深层嵌套字段的遍历和匹配
1185
- * - 字段配置的合并/覆盖更新
1186
- * - 字段的添加、插入、删除
1187
- * - 父级字段查找
1188
- *
1189
- * @template D - 表单数据类型,用于路径类型推导
1190
- * @template F - 字段配置类型,继承自 BaseField<D>
1191
- * @template FormInstance - 底层 FormItem 组件实例类型
1192
- *
1193
- * @param {F[]} [initFields] - 初始字段配置数组
1194
- *
1195
- * @returns {object} 字段操作对象
1196
- * @returns {Ref<F[]>} .fields - 字段配置数组(响应式)
1197
- * @returns {Function} .getField(path) - 获取字段配置
1198
- * @returns {Function} .setField(path, field) - 更新字段配置
1199
- * @returns {Function} .deleteField(path) - 删除字段
1200
- * @returns {Function} .appendField(path, field) - 在指定字段后追加
1201
- * @returns {Function} .prependField(path, field) - 在指定字段前插入
1202
- * @returns {Function} .getParentField(path) - 获取父级字段
1203
- *
1204
- * @example
1205
- * ```ts
1206
- * interface User { name: string; age: number; address: { city: string } }
1207
- *
1208
- * const { fields, getField, setField, deleteField } = useFields<User>([
1209
- * { path: 'name', label: '姓名', component: 'input' },
1210
- * { path: 'age', label: '年龄', component: 'input-number' },
1211
- * {
1212
- * path: 'address',
1213
- * label: '地址',
1214
- * fields: [
1215
- * { path: 'city', label: '城市' },
1216
- * ],
1217
- * },
1218
- * ])
1219
- *
1220
- * // 通过路径获取字段
1221
- * getField('name') // { path: 'name', label: '姓名', ... }
1222
- * getField('address.city') // { path: 'city', label: '城市', ... }
1223
- *
1224
- * // 通过查找函数获取字段
1225
- * getField(f => f.label === '姓名')
1226
- *
1227
- * // 更新字段(合并模式)
1228
- * setField('name', { label: '用户名' })
1229
- *
1230
- * // 删除字段
1231
- * deleteField('age')
1232
- *
1233
- * // 追加/插入字段
1234
- * appendField('name', { path: 'email', label: '邮箱', component: 'input' })
1235
- * prependField('name', { path: 'id', label: 'ID', component: 'input' })
1236
- * ```
1237
- */
1238
- declare const useFields_2: <D extends Data = Data, F extends BaseField<D> = BaseField<D>, FormInstance = any>(initFields?: F[]) => {
1239
- fields: Ref<F[], F[]>;
1240
- getField: {
1241
- (path: Path<D> | FieldFindBy<D, F>): Readonly<F & AdditionalMethods<FormInstance>> | undefined;
1242
- (path: Path<D> | FieldFindBy<D, F>, options?: {
1243
- all?: false;
1244
- }): Readonly<F & AdditionalMethods<FormInstance>> | undefined;
1245
- (path: Path<D> | FieldFindBy<D, F>, options: {
1246
- all: true;
1247
- }): Readonly<F & AdditionalMethods<FormInstance>>[] | undefined;
1248
- };
1249
- setField: (path: Path<D> | FieldFindBy<D, F>, field: F | ((preField: Readonly<F>) => F), options?: {
1250
- updateType?: "rewrite" | "merge";
1251
- } & UpdateFieldOptions) => void;
1252
- deleteField: (path: Path<D> | FieldFindBy<D, F>, options?: UpdateFieldOptions) => void;
1253
- appendField: (path: Path<D> | FieldFindBy<D, F> | undefined, field: F | F[], options?: UpdateFieldOptions) => void;
1254
- prependField: (path: Path<D> | FieldFindBy<D, F> | undefined, field: F | F[], options?: UpdateFieldOptions) => void;
1255
- getParentField: {
1256
- (path: Path<D> | FieldFindBy<D, F>): Readonly<F & AdditionalMethods<FormInstance>> | undefined;
1257
- (path: Path<D> | FieldFindBy<D, F>, options: {
1258
- all?: false;
1259
- }): Readonly<F & AdditionalMethods<FormInstance>> | undefined;
1260
- (path: Path<D> | FieldFindBy<D, F>, options: {
1261
- all: true;
1262
- }): Readonly<F & AdditionalMethods<FormInstance>>[] | undefined;
1263
- };
1264
- };
1265
-
1266
- /**
1267
- * 创建 @qin-ui/element-plus-pro 表单实例的 Hook
1268
- *
1269
- * @description 类型安全的 re-export。将 core useForm 的泛型参数绑定为本地类型:
1270
- * - 字段类型 F → Field<ComponentName, D>(支持 Element Plus 组件类型推导)
1271
- * - 表单实例 → Element Plus 的 FormInstance
1272
- *
1273
- * @template D - 表单数据类型
1274
- *
1275
- * @example
1276
- * ```ts
1277
- * interface User { name: string; age: number }
1278
- *
1279
- * const form = useForm<User>(
1280
- * { name: '张三', age: 25 },
1281
- * [
1282
- * { path: 'name', label: '姓名', component: 'input' },
1283
- * { path: 'age', label: '年龄', component: 'input-number' },
1284
- * ]
1285
- * )
1286
- * ```
1287
-
1288
- * @public
1289
- */
1290
- export declare const useForm: {
1291
- <D extends Data = Data>(initFormData?: ExtendWithAny<DeepPartial<D>>, initFields?: Field<ComponentName, D>[], root?: boolean): Form<D, Field<ComponentName, D>>;
1292
- <D extends Data = Data>(root?: boolean): Form<D, Field<ComponentName, D>>;
1293
- };
1294
-
1295
- /**
1296
- * 表单数据处理 Hook
1297
- *
1298
- * @description 提供响应式表单数据的管理能力,支持:
1299
- * - 响应式数据存储(基于 Vue reactive)
1300
- * - 深层路径读写(支持点号分隔,如 'address.city')
1301
- * - 类型安全的路径提示(传入泛型 D 后,path 参数可获得类型推导)
1302
- * - 父子表单自动注入(非根表单会从注入中获取数据)
1303
- * @public
1304
- *
1305
- * @template D - 表单数据类型,应为一个对象类型
1306
- * @param {ExtendWithAny<DeepPartial<D>>} [initFormData] - 初始表单数据
1307
- *
1308
- * @returns {object} 表单数据操作对象
1309
- * @returns {D & Record<string, any>} .formData - 响应式表单数据
1310
- * @returns {Function} .getFormData(path) - 获取指定路径的数据
1311
- * @returns {Function} .setFormData(path, value) - 设置指定路径的数据
1312
- *
1313
- * @example
1314
- * ```ts
1315
- * interface User { name: string; age: number; address: { city: string } }
1316
- *
1317
- * const { formData, getFormData, setFormData } = useFormData<User>({
1318
- * name: '张三',
1319
- * address: { city: '北京' }
1320
- * })
1321
- *
1322
- * // 读取
1323
- * getFormData('name') // '张三'
1324
- * getFormData('address.city') // '北京'
1325
- * formData.name // '张三'(响应式)
1326
- *
1327
- * // 设置
1328
- * setFormData('name', '李四')
1329
- * setFormData('address.city', '上海')
1330
- * setFormData({ name: '王五', age: 30 }) // 批量覆盖
1331
- * setFormData(prev => ({ ...prev, name: '赵六' })) // 函数式更新
1332
- * ```
1333
- */
1334
- export declare const useFormData: <D extends Data = Data>(initFormData?: ExtendWithAny<DeepPartial<D>>) => {
1335
- formData: Reactive<ExtendWithAny<D>>;
1336
- getFormData: {
1337
- <K extends keyof D>(path: K): D[K];
1338
- <K extends keyof D & string, K1 extends keyof D[K] & string>(path: `${K}.${K1}`): D[K][K1];
1339
- <K extends keyof D & string, K1_1 extends keyof D[K] & string, K2 extends keyof D[K][K1_1] & string>(path: `${K}.${K1_1}.${K2}`): D[K][K1_1][K2];
1340
- (path: Path<D>): any;
1341
- };
1342
- setFormData: {
1343
- (path: Path<D>, value: any): void;
1344
- (path: Path<D>, value: (v: any) => any): void;
1345
- (value: ExtendWithAny<DeepPartial<D>>): void;
1346
- (value: (v: ExtendWithAny<DeepPartial<D>>) => ExtendWithAny<DeepPartial<D>>): void;
1347
- };
1348
- };
1349
-
1350
- /**
1351
- * @qin-ui/element-plus-pro 的表单组件实例引用 Hook
1352
- *
1353
- * @description 类型安全的 re-export。将 core useFormRef 的泛型参数绑定为 Element Plus 的 FormInstance,
1354
- * 使 formRef 获取到完整的 Element Plus Form 组件 API 类型提示。
1355
- *
1356
- * @returns {object} 表单组件实例引用管理对象
1357
- * @returns {Ref<FormInstance | undefined>} .formRef - Element Plus Form 实例的响应式引用
1358
- * @returns {Function} .setFormRef(inst) - 设置表单组件实例
1359
- *
1360
- * @example
1361
- * ```ts
1362
- * const { formRef, setFormRef } = useFormRef()
1363
- * await formRef.value?.validate()
1364
- * formRef.value?.resetFields()
1365
- * ```
1366
-
1367
- * @public
1368
- */
1369
- export declare const useFormRef: {
1370
- (): ReturnType<typeof useFormRef_2<FormInstance>>;
1371
- };
1372
-
1373
- /**
1374
- * 表单组件实例引用 Hook
1375
- *
1376
- * @description 用于获取和设置底层 UI 框架(如 ant-design-vue、element-plus)的 Form 组件实例。
1377
- * 在 ProForm 组件内部自动调用 setFormRef 绑定实例,外部可通过 formRef 访问。
1378
- *
1379
- * @template F - 底层 Form 组件实例类型,默认为 any
1380
- *
1381
- * @returns {object} 表单组件实例引用管理对象
1382
- * @returns {Ref<F | undefined>} .formRef - 表单组件实例的响应式引用
1383
- * @returns {Function} .setFormRef(inst) - 设置表单组件实例
1384
- *
1385
- * @example
1386
- * ```ts
1387
- * const { formRef, setFormRef } = useFormRef<InstanceType<typeof AForm>>()
1388
- * setFormRef(formComponentInstance)
1389
- * console.log(formRef.value) // 可通过 formRef 访问底层 Form 实例的方法
1390
- * ```
1391
- */
1392
- declare const useFormRef_2: <F = any>() => {
1393
- formRef: Ref<F | undefined, F | undefined>;
1394
- setFormRef: (inst: F) => void;
1395
- };
1396
-
1397
- /**
1398
- * 创建 @qin-ui/element-plus-pro 表格实例的 Hook
1399
- *
1400
- * @description 基于 core useTable 封装,适配 Element Plus 的 API 风格:
1401
- * - 数据源使用 `data` 而非 `dataSource`
1402
- *
1403
- * @template D - 搜索表单数据类型
1404
- * @template T - 表格行数据类型
1405
- *
1406
- * @example
1407
- * ```ts
1408
- * interface User { name: string; age: number }
1409
- *
1410
- * const table = useTable<User>({
1411
- * columns: [
1412
- * { prop: 'name', title: '姓名', width: 120 },
1413
- * { prop: 'age', title: '年龄', width: 80 },
1414
- * ],
1415
- * data: [],
1416
- * pageParam: { current: 1, pageSize: 20, total: 0 },
1417
- * })
1418
- * ```
1419
-
1420
- * @public
1421
- */
1422
- export declare const useTable: <D extends Data = Data, T extends Data = ExtendWithAny<D>>(params?: UseTableParams<D, T>) => Table<D, T>;
1423
-
1424
- declare type UseTableParams<D extends Data = Data, T extends Data = ExtendWithAny<D>> = {
1425
- /** 列配置数组 */
1426
- columns?: Columns<T>;
1427
- /** 数据源数组(Element Plus 使用 data 而非 dataSource) */
1428
- data?: T[];
1429
- /** 初始分页参数 */
1430
- pageParam?: PageParam;
1431
- /** 初始搜索参数 */
1432
- searchParam?: ExtendWithAny<DeepPartial<D>>;
1433
- /** 搜索表单字段配置 */
1434
- searchFields?: Fields<D>;
1435
- };
1436
-
1437
- declare type ValueFormatter = {
1438
- (val: any, oldVal: any): any;
1439
- } | {
1440
- get?: (val: any) => any;
1441
- set?: (val: any, oldVal: any) => any;
1442
- };
1443
-
1444
- declare type VModelProps<T = any> = {
1445
- modelValue?: T;
1446
- 'onUpdate:modelValue'?: (val: T) => void;
1447
- };
1448
-
1449
- declare type WithCommon<T, D extends Data = Data> = WithRef<WithCommonBase<T> & BaseWithoutFields<D>>;
1450
-
1451
- declare type WithCommonBase<T = unknown> = T & Omit<FormItemProps, 'label'> & ColProps;
1452
-
1453
- /**
1454
- * @description 自动从 Vue 组件提取 Props 和 Slots,并加上公共表单字段属性
1455
- * @template T - Vue 组件类型
1456
- * @template D - 数据对象类型
1457
- */
1458
- declare type WithComponent<T extends abstract new (...args: any) => any, D extends Data = Data> = WithCommon<{
1459
- slots?: Partial<ComponentSlots<T>>;
1460
- } & Partial<Omit<ComponentProps<T>, keyof VNodeProps>>, D>;
1461
-
1462
- declare type WithFields<D extends Data = Data> = WithRef<WithCommonBase & BaseWithFields<D>>;
1463
-
1464
- /**
1465
- * @description 为对象属性添加响应式支持的类型
1466
- * @template T - 原始类型
1467
- */
1468
- declare type WithRef<T> = {
1469
- [P in keyof T]: P extends NotSupportedRefOrGetterProps ? T[P] : T[P] extends (...args: any[]) => any ? T[P] : MaybeRefOrComputedRef<T[P]>;
1470
- };
1471
-
1472
- export { }
1
+ import { App } from 'vue';
2
+ import { default as ProForm } from './components/form';
3
+ import { default as ProTable } from './components/table';
4
+ import { default as ProComponentProvider } from './components/component-provider';
5
+ export * from './components/form';
6
+ export * from './components/table';
7
+ export * from './components/component-provider';
8
+ /**
9
+ * Schema 驱动的表单组件,基于 element-plus Form 封装
10
+ *
11
+ * @description 通过声明式 JSON Schema 配置即可快速生成表单,
12
+ * 提供极致的 TypeScript 类型推导与组件库插槽扩展能力。
13
+ *
14
+ * @example
15
+ * ```vue
16
+ * <script setup lang="ts">
17
+ * import { ProForm, useForm } from '@qin-ui/element-plus-pro'
18
+ * const form = useForm<User>({ name: '' }, [
19
+ * { path: 'name', label: '姓名', component: 'input' }
20
+ * ])
21
+ * </script>
22
+ * <template>
23
+ * <ProForm :form="form" />
24
+ * </template>
25
+ * ```
26
+ *
27
+ * Schema 驱动的表格组件,基于 element-plus Table 封装
28
+ *
29
+ * @description 通过声明式列配置即可生成功能完整的表格,
30
+ * 支持列动态控制、搜索表单集成、分页管理等企业级能力。
31
+ *
32
+ * @example
33
+ * ```vue
34
+ * <script setup lang="ts">
35
+ * import { ProTable, useTable } from '@qin-ui/element-plus-pro'
36
+ * const table = useTable<User>({ columns: [{ key: 'name', title: '姓名' }] })
37
+ * </script>
38
+ * <template>
39
+ * <ProTable :table="table" />
40
+ * </template>
41
+ * ```
42
+ *
43
+ * 组件提供者,用于全局配置 ProForm ProTable 的默认行为
44
+ *
45
+ * @description 通过 `ProComponentProvider` 包裹应用根组件,
46
+ * 可以全局覆盖组件的默认属性(如表单布局、表格尺寸等)。
47
+ *
48
+ * @example
49
+ * ```vue
50
+ * <template>
51
+ * <ProComponentProvider :component-props="customProps">
52
+ * <App />
53
+ * </ProComponentProvider>
54
+ * </template>
55
+ * ```
56
+ */
57
+ export { ProForm, ProTable, ProComponentProvider };
58
+ declare const _default: {
59
+ /**
60
+ * @qin-ui/element-plus-pro 安装方法
61
+ * @description 全局注册所有组件(ProForm、ProTable、ProComponentProvider)
62
+ *
63
+ * @param {App} app - Vue 应用实例
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * import { createApp } from 'vue'
68
+ * import ProComponents from '@qin-ui/element-plus-pro'
69
+ * const app = createApp(App)
70
+ * app.use(ProComponents)
71
+ * ```
72
+ */
73
+ install(app: App): void;
74
+ };
75
+ export default _default;
76
+ //# sourceMappingURL=index.d.ts.map