@qin-ui/antd-vue-pro 2.1.15 → 2.2.1

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 (124) hide show
  1. package/AI-CONTEXT.md +52 -38
  2. package/LICENSE +9 -0
  3. package/api.json +42 -31
  4. package/es/antd-vue-pro.css +9 -9
  5. package/es/components/component-provider/components/index.vue.d.ts +35 -0
  6. package/es/components/component-provider/components/index.vue.d.ts.map +1 -0
  7. package/es/components/component-provider/constants/index.d.ts +16 -0
  8. package/es/components/component-provider/constants/index.d.ts.map +1 -0
  9. package/es/components/component-provider/index.d.ts +4 -0
  10. package/es/components/component-provider/index.d.ts.map +1 -0
  11. package/es/components/component-provider/types/index.d.ts +63 -0
  12. package/es/components/component-provider/types/index.d.ts.map +1 -0
  13. package/es/components/form/components/BaseField/index.vue.d.ts +13 -0
  14. package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -0
  15. package/es/components/form/components/BaseField/utils/index.d.ts +3 -0
  16. package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -0
  17. package/es/components/form/components/BaseFormItem/index.vue.d.ts +9 -0
  18. package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -0
  19. package/es/components/form/components/ContainerFragment/index.vue.d.ts +23 -0
  20. package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -0
  21. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts +29 -0
  22. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts.map +1 -0
  23. package/es/components/form/components/PathProvider/index.vue.d.ts +24 -0
  24. package/es/components/form/components/PathProvider/index.vue.d.ts.map +1 -0
  25. package/es/components/form/components/ProForm/index.vue.d.ts +36 -0
  26. package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -0
  27. package/es/components/form/components/SlotComponent/index.vue.d.ts +7 -0
  28. package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -0
  29. package/es/components/form/components/index.d.ts +12 -0
  30. package/es/components/form/components/index.d.ts.map +1 -0
  31. package/es/components/form/constants/index.d.ts +78 -0
  32. package/es/components/form/constants/index.d.ts.map +1 -0
  33. package/es/components/form/hooks/index.d.ts +5 -0
  34. package/es/components/form/hooks/index.d.ts.map +1 -0
  35. package/es/components/form/hooks/useFields.d.ts +57 -0
  36. package/es/components/form/hooks/useFields.d.ts.map +1 -0
  37. package/es/components/form/hooks/useForm.d.ts +93 -0
  38. package/es/components/form/hooks/useForm.d.ts.map +1 -0
  39. package/es/components/form/hooks/useFormRef.d.ts +30 -0
  40. package/es/components/form/hooks/useFormRef.d.ts.map +1 -0
  41. package/es/components/form/index.d.ts +7 -0
  42. package/es/components/form/index.d.ts.map +1 -0
  43. package/es/components/form/types/index.d.ts +207 -0
  44. package/es/components/form/types/index.d.ts.map +1 -0
  45. package/es/components/table/components/ColumnControl.vue.d.ts +9 -0
  46. package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -0
  47. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts +18 -0
  48. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -0
  49. package/es/components/table/components/DefaultTableContainer.vue.d.ts +18 -0
  50. package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -0
  51. package/es/components/table/components/ProTable.vue.d.ts +100 -0
  52. package/es/components/table/components/ProTable.vue.d.ts.map +1 -0
  53. package/es/components/table/components/SearchForm.vue.d.ts +48 -0
  54. package/es/components/table/components/SearchForm.vue.d.ts.map +1 -0
  55. package/es/components/table/components/SizeControl.vue.d.ts +12 -0
  56. package/es/components/table/components/SizeControl.vue.d.ts.map +1 -0
  57. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts +3 -0
  58. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts.map +1 -0
  59. package/es/components/table/components/icons/DownOutlined.vue.d.ts +3 -0
  60. package/es/components/table/components/icons/DownOutlined.vue.d.ts.map +1 -0
  61. package/es/components/table/components/icons/FilterOutlined.vue.d.ts +3 -0
  62. package/es/components/table/components/icons/FilterOutlined.vue.d.ts.map +1 -0
  63. package/es/components/table/components/index.d.ts +5 -0
  64. package/es/components/table/components/index.d.ts.map +1 -0
  65. package/es/components/table/hooks/index.d.ts +2 -0
  66. package/es/components/table/hooks/index.d.ts.map +1 -0
  67. package/es/components/table/hooks/useTable.d.ts +112 -0
  68. package/es/components/table/hooks/useTable.d.ts.map +1 -0
  69. package/es/components/table/index.d.ts +8 -0
  70. package/es/components/table/index.d.ts.map +1 -0
  71. package/es/components/table/types/index.d.ts +70 -0
  72. package/es/components/table/types/index.d.ts.map +1 -0
  73. package/es/index.d.ts +76 -1622
  74. package/es/index.d.ts.map +1 -0
  75. package/es/index.js +1314 -25
  76. package/es/index.js.map +1 -0
  77. package/es/shared/core/index.d.ts +6 -0
  78. package/es/shared/core/index.d.ts.map +1 -0
  79. package/es/shared/ui/index.d.ts +15 -0
  80. package/es/shared/ui/index.d.ts.map +1 -0
  81. package/package.json +20 -17
  82. package/src/components/component-provider/components/index.vue +81 -0
  83. package/src/components/component-provider/constants/index.ts +165 -0
  84. package/src/components/component-provider/index.ts +6 -0
  85. package/src/components/component-provider/types/index.ts +90 -0
  86. package/src/components/form/components/BaseField/index.vue +188 -0
  87. package/src/components/form/components/BaseField/utils/index.ts +16 -0
  88. package/src/components/form/components/BaseFormItem/index.vue +163 -0
  89. package/src/components/form/components/ContainerFragment/index.vue +24 -0
  90. package/src/components/form/components/GroupedFieldAttrs/index.vue +118 -0
  91. package/src/components/form/components/PathProvider/index.vue +19 -0
  92. package/src/components/form/components/ProForm/index.vue +109 -0
  93. package/src/components/form/components/SlotComponent/index.vue +26 -0
  94. package/src/components/form/components/index.ts +15 -0
  95. package/src/components/form/constants/index.ts +135 -0
  96. package/src/components/form/hooks/index.ts +5 -0
  97. package/src/components/form/hooks/useFields.ts +67 -0
  98. package/src/components/form/hooks/useForm.ts +110 -0
  99. package/src/components/form/hooks/useFormRef.ts +35 -0
  100. package/src/components/form/index.ts +29 -0
  101. package/src/components/form/types/index.ts +271 -0
  102. package/src/components/table/components/ColumnControl.vue +132 -0
  103. package/src/components/table/components/DefaultSearchFormContainer.vue +20 -0
  104. package/src/components/table/components/DefaultTableContainer.vue +20 -0
  105. package/src/components/table/components/ProTable.vue +366 -0
  106. package/src/components/table/components/SearchForm.vue +295 -0
  107. package/src/components/table/components/SizeControl.vue +59 -0
  108. package/src/components/table/components/icons/ColumnHeightOutlined.vue +4 -0
  109. package/src/components/table/components/icons/DownOutlined.vue +4 -0
  110. package/src/components/table/components/icons/FilterOutlined.vue +4 -0
  111. package/src/components/table/components/index.ts +4 -0
  112. package/src/components/table/hooks/index.ts +1 -0
  113. package/src/components/table/hooks/useTable.ts +130 -0
  114. package/src/components/table/index.ts +14 -0
  115. package/src/components/table/types/index.ts +74 -0
  116. package/src/index.ts +80 -0
  117. package/src/shared/core/index.ts +37 -0
  118. package/src/shared/ui/index.ts +60 -0
  119. package/es/component-provider/index-Dmz32tSB.js +0 -174
  120. package/es/component-provider/index.js +0 -4
  121. package/es/core/index-ghYuQ3Sy.js +0 -360
  122. package/es/form/index.js +0 -451
  123. package/es/table/index.js +0 -703
  124. package/es/vendor/utils/lodash-es-p6jau26B.js +0 -1120
package/AI-CONTEXT.md CHANGED
@@ -26,25 +26,25 @@ If not found in the built-in map, the string is resolved against `ProComponentPr
26
26
 
27
27
  ### 1.3 Built-in component map
28
28
 
29
- | Field `component` | ant-design-vue component | Key pass-through props (verify against https://antdv.com) |
30
- | :--------------------- | :----------------------- | :------------------------------------------------------------------ |
31
- | `'input'` | Input | placeholder, maxlength, allowClear, addonBefore, addonAfter, prefix, suffix, showCount |
32
- | `'textarea'` | TextArea | rows, maxlength, showCount, autoSize |
33
- | `'input-password'` | InputPassword | placeholder, maxlength, visibilityToggle |
34
- | `'input-search'` | InputSearch | placeholder, loading, onSearch |
35
- | `'input-number'` | InputNumber | min, max, step, precision, formatter, parser |
36
- | `'select'` | Select | **options**, mode, showSearch, filterOption, allowClear, loading |
37
- | `'cascader'` | Cascader | **options**, fieldNames, showSearch, allowClear |
38
- | `'date-picker'` | DatePicker | picker, format, showTime, disabledDate, valueFormat |
39
- | `'range-picker'` | RangePicker | format, showTime, disabledDate, allowClear |
40
- | `'time-picker'` | TimePicker | format, showSecond, hourStep, minuteStep |
41
- | `'checkbox-group'` | CheckboxGroup | **options**, direction |
42
- | `'radio-group'` | RadioGroup | **options**, direction, buttonStyle |
43
- | `'switch'` | Switch | checkedChildren, unCheckedChildren, loading |
44
- | `'slider'` | Slider | min, max, step, marks, range, tooltip |
45
- | `'tree-select'` | TreeSelect | **treeData**, showSearch, treeCheckable, fieldNames |
46
- | `'transfer'` | Transfer | **dataSource**, **titles**, **targetKeys**, showSearch, render |
47
- | `'custom'` | (user-supplied) | component receives a Vue component or `h()` render function |
29
+ | Field `component` | ant-design-vue component | Key pass-through props (verify against https://antdv.com) |
30
+ | :----------------- | :----------------------- | :------------------------------------------------------------------------------------- |
31
+ | `'input'` | Input | placeholder, maxlength, allowClear, addonBefore, addonAfter, prefix, suffix, showCount |
32
+ | `'textarea'` | TextArea | rows, maxlength, showCount, autoSize |
33
+ | `'input-password'` | InputPassword | placeholder, maxlength, visibilityToggle |
34
+ | `'input-search'` | InputSearch | placeholder, loading, onSearch |
35
+ | `'input-number'` | InputNumber | min, max, step, precision, formatter, parser |
36
+ | `'select'` | Select | **options**, mode, showSearch, filterOption, allowClear, loading |
37
+ | `'cascader'` | Cascader | **options**, fieldNames, showSearch, allowClear |
38
+ | `'date-picker'` | DatePicker | picker, format, showTime, disabledDate, valueFormat |
39
+ | `'range-picker'` | RangePicker | format, showTime, disabledDate, allowClear |
40
+ | `'time-picker'` | TimePicker | format, showSecond, hourStep, minuteStep |
41
+ | `'checkbox-group'` | CheckboxGroup | **options**, direction |
42
+ | `'radio-group'` | RadioGroup | **options**, direction, buttonStyle |
43
+ | `'switch'` | Switch | checkedChildren, unCheckedChildren, loading |
44
+ | `'slider'` | Slider | min, max, step, marks, range, tooltip |
45
+ | `'tree-select'` | TreeSelect | **treeData**, showSearch, treeCheckable, fieldNames |
46
+ | `'transfer'` | Transfer | **dataSource**, **titles**, **targetKeys**, showSearch, render |
47
+ | `'custom'` | (user-supplied) | component receives a Vue component or `h()` render function |
48
48
 
49
49
  > The prop column is illustrative. **Always verify prop names/types against [antdv.com](https://antdv.com).**
50
50
 
@@ -87,14 +87,26 @@ Controls the `v-model:xxx` binding name.
87
87
 
88
88
  ## 3. Progressive usage
89
89
 
90
- ### Level 1: Config-driven (no hand-written a-* tags)
90
+ ### Level 1: Config-driven (no hand-written a-\* tags)
91
91
 
92
92
  ```ts
93
93
  import { ProForm, useForm } from '@qin-ui/antd-vue-pro';
94
94
 
95
95
  const form = useForm({ username: '', password: '' }, [
96
- { path: 'username', component: 'input', label: '用户名', placeholder: '请输入', rules: [{ required: true }] },
97
- { path: 'password', component: 'input-password', label: '密码', placeholder: '请输入', rules: [{ required: true }] },
96
+ {
97
+ path: 'username',
98
+ component: 'input',
99
+ label: '用户名',
100
+ placeholder: '请输入',
101
+ rules: [{ required: true }],
102
+ },
103
+ {
104
+ path: 'password',
105
+ component: 'input-password',
106
+ label: '密码',
107
+ placeholder: '请输入',
108
+ rules: [{ required: true }],
109
+ },
98
110
  ]);
99
111
  ```
100
112
 
@@ -162,27 +174,29 @@ Wrap your app to set defaults for all ProForm/ProTable instances. Merged with pr
162
174
 
163
175
  ### Built-in presets (INJECT_CONFIG)
164
176
 
165
- | Component | Preset |
166
- | :--------------------------------------------- | :----------------------------------------------------------------------------- |
167
- | `switch` | `{ modelProp: 'checked' }` |
168
- | `input` | `{ maxlength: 100, allowClear: true, placeholder: '请输入' }` |
169
- | `textarea` | `{ maxlength: 200, autoSize: {minRows:3,maxRows:6}, showCount: true, allowClear: true, placeholder: '请输入' }` |
170
- | `select` / `cascader` | `{ allowClear: true, placeholder: '请选择', getPopupContainer }` |
171
- | `input-number` | `{ max: 10^15, min: -(10^15), controls: false, placeholder: '请输入', style: {width:'100%'} }` |
172
- | `date-picker` / `range-picker` / `time-picker` | `{ allowClear: true, getPopupContainer, style: {width:'100%'} }` |
177
+ | Component | Preset |
178
+ | :--------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
179
+ | `switch` | `{ modelProp: 'checked' }` |
180
+ | `input` | `{ maxlength: 100, allowClear: true, placeholder: '请输入' }` |
181
+ | `textarea` | `{ maxlength: 200, autoSize: {minRows:3,maxRows:6}, showCount: true, allowClear: true, placeholder: '请输入' }` |
182
+ | `select` / `cascader` | `{ allowClear: true, placeholder: '请选择', getPopupContainer }` |
183
+ | `input-number` | `{ max: 10^15, min: -(10^15), controls: false, placeholder: '请输入', style: {width:'100%'} }` |
184
+ | `date-picker` / `range-picker` / `time-picker` | `{ allowClear: true, getPopupContainer, style: {width:'100%'} }` |
173
185
  | `pro-table` | `{ pagination: {showTotal, showSizeChanger, showQuickJumper}, searchFormConfig: {layout:'grid'}, control: true, addIndexColumn: true }` |
174
- | `pro-form` | `{ grid: { gutter: {xs:8, sm:16, md:16, lg:24} } }` |
175
- | `pro-form-item` | `{ validateFirst: true, span: 8 }` |
186
+ | `pro-form` | `{ grid: { gutter: {xs:8, sm:16, md:16, lg:24} } }` |
187
+ | `pro-form-item` | `{ validateFirst: true, span: 8 }` |
176
188
 
177
189
  ### Override example
178
190
 
179
191
  ```vue
180
- <ProComponentProvider :component-vars="{
181
- 'pro-form-item': { span: 6 },
182
- input: { maxlength: 200 },
183
- select: { showSearch: true },
184
- 'pro-table': { addIndexColumn: false },
185
- }">
192
+ <ProComponentProvider
193
+ :component-vars="{
194
+ 'pro-form-item': { span: 6 },
195
+ input: { maxlength: 200 },
196
+ select: { showSearch: true },
197
+ 'pro-table': { addIndexColumn: false },
198
+ }"
199
+ >
186
200
  <ProForm :form="form" />
187
201
  <ProTable :table="table" />
188
202
  </ProComponentProvider>
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present pro-components
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/api.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-07-06T09:29:31.605Z",
2
+ "generatedAt": "2026-07-10T10:21:21.983Z",
3
3
  "name": "@qin-ui/antd-vue-pro",
4
4
  "api": [
5
5
  {
@@ -9,7 +9,7 @@
9
9
  "signature": "<ProComponentProvider>",
10
10
  "description": "@qin-ui/antd-vue-pro 全局配置提供者组件\n用于在组件树的顶层配置所有子组件的全局默认属性。\n支持配置 ProForm、ProTable、ProFormItem 以及所有内置组件的默认属性。",
11
11
  "examples": [
12
- "```vue\n<template>\n<ProComponentProvider\n:componentVars=\"{\n'pro-form': { labelCol: { span: 4 } },\n'input': { placeholder: '请输入', maxlength: 200 },\n'select': { placeholder: '请选择' },\n}\"\n>\n<ProForm :form=\"form\" :fields=\"fields\" />\n</ProComponentProvider>\n</template>\n```"
12
+ "```vue\n<template>\n<ProComponentProvider\n:componentVars=\"{\n'pro-form': { labelCol: { span: 4 } },\n'input': { placeholder: '请输入', maxlength: 200 },\n'select': { placeholder: '请选择' },\n}\"\n>\n<ProForm :form=\"form\" />\n</ProComponentProvider>\n</template>\n```"
13
13
  ]
14
14
  },
15
15
  {
@@ -19,28 +19,28 @@
19
19
  "signature": "export type ComponentVars = Partial<RequiredComponentVars>;",
20
20
  "description": "组件全局配置\nRequiredComponentVars 的 Partial 版本,用于 ProComponentProvider 的 props"
21
21
  },
22
+ {
23
+ "name": "ContainerFragment",
24
+ "type": "component",
25
+ "package": "@qin-ui/antd-vue-pro",
26
+ "signature": "<ContainerFragment>",
27
+ "description": "容器分片渲染组件。用于动态渲染表单行或表单项的外部包裹容器(例如 Grid 行、Col 列等布局容器)。"
28
+ },
22
29
  {
23
30
  "name": "ProForm",
24
31
  "type": "component",
25
32
  "package": "@qin-ui/antd-vue-pro",
26
33
  "signature": "<ProForm>",
27
- "description": "@qin-ui/antd-vue-pro 配置驱动表单组件\n通过配置驱动的方式快速构建表单,支持:\n- 字段联动(通过 setField、watch 等实现)\n- 嵌套字段(通过 fields 递归配置)\n- 自定义组件(通过 component 属性和 custom 类型)\n- 网格布局(通过 grid 属性)\n- 动态插槽(以字段 path 命名的插槽)\n- 全局配置注入(通过 ProComponentProvider)",
34
+ "description": "@qin-ui/antd-vue-pro 配置驱动表单组件\n架构设计说明 (Architecture Overview)\n[ 数据层 (Core) ] => [ 绑定层 (ProForm) ] => [ 渲染层 (BaseFormItem / BaseField) ]\n1. 数据隔离:ProForm 本身不负责存储和管理表单状态,所有核心状态(formData, fields, 校验规则)\n均交由底层的 `useForm`(@qin-ui/pro-components-core)驱动。\n2. 上下文透传:通过 `provide` 将核心状态下发给子组件,避免了深层嵌套的 Props 传递。\n3. 递归渲染:网格布局和具体字段的解析交由 `<BaseFormItem>` 递归完成,实现了 UI 布局与表单逻辑的解耦。\n通过配置驱动的方式快速构建表单,支持:\n- 字段联动(通过 setField、watch 等实现)\n- 嵌套字段(通过 fields 递归配置)\n- 自定义组件(通过 component 属性和 custom 类型)\n- 网格布局(通过 grid 属性)\n- 动态插槽(以字段 path 命名的插槽)\n- 全局配置注入(通过 ProComponentProvider)",
28
35
  "typeParams": [
29
36
  {
30
37
  "name": "F"
31
38
  }
32
39
  ],
33
40
  "examples": [
34
- "```vue\n<template>\n<ProForm :form=\"form\" :fields=\"fields\" @submit=\"handleSubmit\">\n<template #name=\"{ value, disabled }\">\n<a-input :value=\"value\" :disabled=\"disabled\" />\n</template>\n</ProForm>\n</template>\n```"
41
+ "```vue\n<template>\n<ProForm :form=\"form\" @submit=\"handleSubmit\">\n<template #name=\"{ value, disabled }\">\n<a-input :value=\"value\" :disabled=\"disabled\" />\n</template>\n</ProForm>\n</template>\n```"
35
42
  ]
36
43
  },
37
- {
38
- "name": "ContainerFragment",
39
- "type": "component",
40
- "package": "@qin-ui/antd-vue-pro",
41
- "signature": "<ContainerFragment>",
42
- "description": "容器分片渲染组件。用于动态渲染表单行或表单项的外部包裹容器(例如 Grid 行、Col 列等布局容器)。"
43
- },
44
44
  {
45
45
  "name": "SlotComponent",
46
46
  "type": "component",
@@ -72,9 +72,9 @@
72
72
  "name": "useFormData",
73
73
  "type": "function",
74
74
  "package": "@qin-ui/antd-vue-pro",
75
- "signature": "export const useFormData = <D extends Data = Data>(\n initFormData?: ExtendWithAny<DeepPartial<D>>\n) =>",
75
+ "signature": "export const useFormData = <D extends Data = Data>(\n initFormData?: ExtendWithAny<DeepPartial<D>>\n): UseFormDataReturn<D> =>",
76
76
  "description": "表单数据处理 Hook\n提供响应式表单数据的管理能力,支持:\n- 响应式数据存储(基于 Vue reactive)\n- 深层路径读写(支持点号分隔,如 'address.city')\n- 类型安全的路径提示(传入泛型 D 后,path 参数可获得类型推导)\n- 父子表单自动注入(非根表单会从注入中获取数据)",
77
- "returns": "{Function} .setFormData(path, value) - 设置指定路径的数据",
77
+ "returns": "{UseFormDataReturn<D>} 表单数据操作对象",
78
78
  "typeParams": [
79
79
  {
80
80
  "name": "D"
@@ -88,15 +88,16 @@
88
88
  "name": "useFields",
89
89
  "type": "function",
90
90
  "package": "@qin-ui/antd-vue-pro",
91
- "signature": "export const useFields = _useFields as",
92
- "description": "类型安全的 re-export。将 core useFields 的泛型参数绑定为本地类型:\n- 字段类型 F → Field<ComponentName, D>(支持 Ant Design Vue 组件类型推导)\n- FormItem 实例 → Ant Design Vue 的 FormItemInstance\n提供对字段配置数组的增删改查操作,详见 `@qin-ui/core` 的 useFields 文档。",
91
+ "signature": "export function useFields<D extends Data = Data>(\n initFields?: Fields<D>\n): UseFieldsReturn<D, Field<ComponentName, D>, FormItemInstance>;",
92
+ "description": "字段配置管理 Hook\n基于 `@qin-ui/pro-components-core` 的 `useFields`,将泛型参数绑定为 Ant Design Vue 的本地类型:\n- 字段类型 F -> `Field<ComponentName, D>`(支持 Ant Design Vue 组件类型推导)\n- FormItem 实例 -> Ant Design Vue 的 `FormItemInstance`\n提供对字段配置数组的增删改查操作,支持:\n- 通过路径字符串或查找函数定位字段\n- 深层嵌套字段的遍历和匹配\n- 字段配置的合并/覆盖更新\n- 字段的添加、插入、删除\n- 父级字段查找\n- `fields` - 字段配置数组(响应式 Ref\\<F[]\\>)\n- `getField(path)` - 获取字段配置,支持路径字符串或查找函数\n- `setField(path, field, options?)` - 更新字段配置,默认合并模式\n- `deleteField(path, options?)` - 删除字段配置\n- `appendField(path, field, options?)` - 在指定字段后追加\n- `prependField(path, field, options?)` - 在指定字段前插入\n- `getParentField(path, options?)` - 获取父级字段配置",
93
+ "returns": "字段操作对象,包含以下属性:",
93
94
  "typeParams": [
94
95
  {
95
96
  "name": "D"
96
97
  }
97
98
  ],
98
99
  "examples": [
99
- "```ts\ninterface User { name: string; age: number }\n\nconst { fields, getField, setField } = useFields<User>([\n{ path: 'name', label: '姓名', component: 'input' },\n{ path: 'age', label: '年龄', component: 'input-number' },\n])\n\n// 获取字段(类型安全,包含 Ant Design Vue 组件属性)\ngetField('name') // 返回值包含 input 组件的所有可选属性\n```"
100
+ "```ts\ninterface User { name: string; age: number }\n\nconst { fields, getField, setField } = useFields<User>([\n{ path: 'name', label: '姓名', component: 'input' },\n{ path: 'age', label: '年龄', component: 'input-number' },\n])\n\n// 通过路径获取\ngetField('name')\n// 通过查找函数获取\ngetField(f => f.label === '姓名')\n// 更新字段(合并模式)\nsetField('name', { label: '用户名', disabled: true })\n```"
100
101
  ]
101
102
  },
102
103
  {
@@ -104,14 +105,14 @@
104
105
  "type": "type",
105
106
  "package": "@qin-ui/antd-vue-pro",
106
107
  "signature": "export type UseFields<D extends Data = Data> = ReturnType<typeof useFields<D>>;",
107
- "description": "useFields 返回值类型,固定为本地 Fields<D>"
108
+ "description": "useFields 返回值类型"
108
109
  },
109
110
  {
110
111
  "name": "Form",
111
112
  "type": "type",
112
113
  "package": "@qin-ui/antd-vue-pro",
113
114
  "signature": "export type Form<\n D extends Data = Data,\n F extends Field<ComponentName, D> = Field<ComponentName, D>,\n> = _Form<D, F, FormInstance>;",
114
- "description": "在 core Form 类型的基础上:\n1. 将字段类型 F 默认绑定为本地 Field<ComponentName, D>,支持 Ant Design Vue 所有内置组件类型\n2. 将底层表单实例 I 绑定为 Ant Design Vue 的 FormInstance,使 formRef 获得完整的类型提示",
115
+ "description": "表单实例类型\n在 core Form 类型的基础上,将字段类型 F 绑定为本地 Field<ComponentName, D>,\n将底层表单实例 I 绑定为 Ant Design Vue 的 FormInstance,使 formRef 获得完整的类型提示。\n1. `setFormData(path, value)` - 设置指定路径的值<br>\n2. `setFormData(path, prev => newVal)` - 函数式更新<br>\n3. `setFormData({ ... })` - 批量覆盖整个表单",
115
116
  "typeParams": [
116
117
  {
117
118
  "name": "D"
@@ -121,33 +122,34 @@
121
122
  }
122
123
  ],
123
124
  "examples": [
124
- "```ts\ninterface User { name: string; age: number }\nconst form: Form<User> = useForm({ name: '张三', age: 25 })\nform.formRef.value?.validate() // 类型安全地访问 Ant Design Vue 的 Form validate 方法\n```"
125
+ "```ts\ninterface User { name: string; age: number }\nconst form: Form<User> = useForm({ name: '张三', age: 25 })\n\nform.formData.name // 直接读写响应式数据\nform.getFormData('name') // 通过路径读取\nform.setFormData('name', '李四') // 更新数据\nform.formRef.value?.validate() // 访问底层 Form 实例\n```"
125
126
  ]
126
127
  },
127
128
  {
128
129
  "name": "useForm",
129
130
  "type": "function",
130
131
  "package": "@qin-ui/antd-vue-pro",
131
- "signature": "export const useForm = _useForm as",
132
- "description": "创建 @qin-ui/antd-vue-pro 表单实例的 Hook\n类型安全的 re-export。将 core useForm 的泛型参数绑定为本地类型:\n- 字段类型 F → Field<ComponentName, D>(支持 Ant Design Vue 组件类型推导)\n- 表单实例 → Ant Design Vue 的 FormInstance\n使用方式与 core useForm 完全一致,详见 {@link @qin-ui/core} 的 useForm 文档。",
132
+ "signature": "export function useForm<D extends Data = Data>(\n initFormData?: ExtendWithAny<DeepPartial<D>>,\n initFields?: Field<ComponentName, D>[],\n root?: boolean\n): Form<D, Field<ComponentName, D>>;",
133
+ "description": "创建表单实例的 Hook\n基于 `@qin-ui/pro-components-core` 的 `useForm`,将泛型参数绑定为 Ant Design Vue 的本地类型:\n- 字段类型 F -> `Field<ComponentName, D>`(支持 Ant Design Vue 所有内置组件类型推导)\n- 表单实例 -> Ant Design Vue 的 `FormInstance`(使 formRef 获得完整的类型提示)\n表单实例组合了三个子模块的能力:\n- **useFormData**:表单数据管理(响应式数据、读写、批量更新)\n- **useFields**:字段配置管理(增删改查字段配置,支持嵌套)\n- **useFormRef**:底层 Form 组件实例引用",
134
+ "returns": "{Form<D>} 表单实例,包含数据操作、字段操作和 ref 操作",
133
135
  "typeParams": [
134
136
  {
135
137
  "name": "D"
136
138
  }
137
139
  ],
138
140
  "examples": [
139
- "```ts\ninterface User { name: string; age: number }\n\nconst form = useForm<User>(\n{ name: '张三', age: 25 },\n[\n{ path: 'name', label: '姓名', component: 'input' },\n{ path: 'age', label: '年龄', component: 'input-number' },\n],\ntrue\n)\n\n// 类型已绑定 Ant Design Vue\nawait form.formRef.value?.validate() // ✅ 类型正确\n```"
141
+ "```ts\ninterface User { name: string; age: number }\n\n// 方式一:同时传入初始数据和字段\nconst form = useForm<User>(\n{ name: '张三', age: 25 },\n[\n{ path: 'name', label: '姓名', component: 'input' },\n{ path: 'age', label: '年龄', component: 'input-number' },\n],\ntrue\n)\n\n// 方式二:仅设置 root 标识\nconst form = useForm<User>(true)\n\n// 使用\nconst { formData, formRef, fields, setFormData, getField } = form\nsetFormData('name', '李四')\nawait formRef.value?.validate()\n```"
140
142
  ]
141
143
  },
142
144
  {
143
145
  "name": "useFormRef",
144
146
  "type": "function",
145
147
  "package": "@qin-ui/antd-vue-pro",
146
- "signature": "export const useFormRef = _useFormRef as",
147
- "description": "类型安全的 re-export。将 core useFormRef 的泛型参数绑定为 Ant Design Vue 的 FormInstance,\n使 formRef 获取到完整的 Ant Design Vue Form 组件 API 类型提示。",
148
- "returns": "{Function} .setFormRef(inst) - 设置表单组件实例",
148
+ "signature": "export function useFormRef(): UseFormRefReturn<FormInstance>",
149
+ "description": "表单组件实例引用 Hook\n基于 `@qin-ui/pro-components-core` 的 `useFormRef`,将泛型参数绑定为 Ant Design Vue 的 `FormInstance`,\n使 formRef 获取到完整的 Ant Design Vue Form 组件 API 类型提示(如 `validate()`、`resetFields()` 等)。\n`formRef` 由 ProForm 组件内部自动通过 `setFormRef` 绑定,无需手动调用。\n- `formRef` — Ant Design Vue Form 组件实例的响应式引用(`Ref<FormInstance | undefined>`)\n- `setFormRef(inst)` — 设置 Form 组件实例,由 ProForm 内部自动调用",
150
+ "returns": "表单组件实例引用管理对象:",
149
151
  "examples": [
150
- "```ts\nconst { formRef, setFormRef } = useFormRef()\n// formRef.value 的类型为 FormInstance | undefined\n// 可安全调用 Ant Design Vue 的 Form API\nawait formRef.value?.validate()\nformRef.value?.resetFields()\n```"
152
+ "```ts\nconst { formRef, setFormRef } = useFormRef()\n\n// formRef 由 ProForm 自动绑定,可直接使用\nawait formRef.value?.validate()\nformRef.value?.resetFields()\nformRef.value?.scrollToField('username')\n```"
151
153
  ]
152
154
  },
153
155
  {
@@ -179,7 +181,7 @@
179
181
  "type": "type",
180
182
  "package": "@qin-ui/antd-vue-pro",
181
183
  "signature": "export type Table<\n D extends Data = Data,\n T extends Data = ExtendWithAny<D>,\n> = _Table<D, T, Column<T>>;",
182
- "description": "在 core Table 类型的基础上,将列类型 C 绑定为本地 Column<T>,\n使 columns 操作获得 Ant Design Vue 表格列的完整属性类型提示(如 title、width、fixed 等)。",
184
+ "description": "表格实例类型\n在 core Table 类型的基础上,将列类型 C 绑定为本地 Column<T>,\n使 columns 操作获得 Ant Design Vue 表格列的完整属性类型提示。",
183
185
  "typeParams": [
184
186
  {
185
187
  "name": "D"
@@ -189,15 +191,24 @@
189
191
  }
190
192
  ],
191
193
  "examples": [
192
- "```ts\ninterface SearchParams { keyword: string }\ninterface User { name: string; age: number }\n\nconst table: Table<SearchParams, User> = useTable({...})\ntable.columns.value[0].title // 类型为 string | undefined\ntable.columns.value[0].width // 类型为 number | undefined(Ant Design Vue 属性)\n```"
194
+ "```ts\ninterface SearchParams { keyword: string }\ninterface User { name: string; age: number }\n\nconst table: Table<SearchParams, User> = useTable({\ncolumns: [{ dataIndex: 'name', title: '姓名' }],\n})\n\ntable.columns.value // 访问列配置\ntable.setColumn('name', { width: 150 }) // 更新列\ntable.setPageParam({ current: 2 }) // 切换页码\ntable.searchForm.setFormData('keyword', '搜索词') // 操作搜索表单\n```"
193
195
  ]
194
196
  },
195
197
  {
196
198
  "name": "useTable",
197
199
  "type": "function",
198
200
  "package": "@qin-ui/antd-vue-pro",
199
- "signature": "export const useTable: <\n D extends Data = Data,\n T extends Data = ExtendWithAny<D>,\n>(params:",
200
- "description": "创建 @qin-ui/antd-vue-pro 表格实例 of Hook\n类型安全的 re-export。将 core useTable 的列类型绑定为本地 Column<T>,\n使 columns 操作获得 Ant Design Vue 表格列的完整类型提示。\n使用方式与 core useTable 完全一致,详见 `@qin-ui/core` 的 useTable 文档。",
201
+ "signature": "export function useTable<\n D extends Data = Data,\n T extends Data = ExtendWithAny<D>,\n>(params:",
202
+ "description": "创建表格实例的 Hook\n基于 `@qin-ui/pro-components-core` 的 `useTable`,将列类型绑定为本地 `Column<T>`。\n是 ProTable 组件的核心 Hook,提供了:\n- 列配置管理(增删改查)\n- 数据源管理\n- 分页管理\n- 搜索表单集成(内部使用 useForm)\n- 查询参数重置",
203
+ "params": [
204
+ {
205
+ "name": "params",
206
+ "type": "object",
207
+ "optional": false,
208
+ "description": "表格配置参数"
209
+ }
210
+ ],
211
+ "returns": "{Table<D, T>} 表格实例",
201
212
  "typeParams": [
202
213
  {
203
214
  "name": "D"
@@ -207,7 +218,7 @@
207
218
  }
208
219
  ],
209
220
  "examples": [
210
- "```ts\ninterface SearchParams { keyword: string }\ninterface User { name: string; age: number; email: string }\n\nconst table = useTable<SearchParams, User>({\ncolumns: [\n{ key: 'name', title: '姓名', width: 120 },\n{ key: 'age', title: '年龄', width: 80 },\n{ key: 'email', title: '邮箱' },\n],\ndataSource: [],\npageParam: { current: 1, pageSize: 20, total: 0 },\nsearchParam: { keyword: '' },\nsearchFields: [\n{ path: 'keyword', label: '关键词', component: 'input' },\n],\n})\n```"
221
+ "```ts\ninterface SearchParams { keyword: string; status: string }\ninterface User { name: string; age: number; email: string }\n\nconst table = useTable<SearchParams, User>({\ncolumns: [\n{ dataIndex: 'name', title: '姓名', width: 120 },\n{ dataIndex: 'age', title: '年龄', width: 80 },\n],\ndataSource: [],\npageParam: { current: 1, pageSize: 20, total: 0 },\nsearchParam: { keyword: '', status: '' },\nsearchFields: [\n{ path: 'keyword', label: '关键词', component: 'input' },\n{ path: 'status', label: '状态', component: 'select' },\n],\n})\n\n// 查询\nconst handleSearch = async () => {\nconst res = await fetchUserList({\n...table.searchForm.formData,\n...table.pageParam,\n})\ntable.dataSource.value = res.data\ntable.setPageParam({ total: res.total })\n}\n\n// 重置\nconst handleReset = () => {\ntable.resetQueryParams()\nhandleSearch()\n}\n```"
211
222
  ]
212
223
  },
213
224
  {
@@ -1,13 +1,13 @@
1
- .pro-table_search-form[data-v-b023c914] [class*='-form-item'] {
1
+ .pro-table_search-form[data-v-aee49e85] [class*='-form-item'] {
2
2
  margin: 0;
3
3
  }
4
- .pro-table_search-form_expand-toggle-button[data-v-b023c914] {
4
+ .pro-table_search-form_expand-toggle-button[data-v-aee49e85] {
5
5
  display: flex;
6
6
  align-items: center;
7
7
  padding: 0;
8
8
  padding-left: 4px;
9
9
  }
10
- .pro-table_search-form .transition[data-v-b023c914] {
10
+ .pro-table_search-form .transition[data-v-aee49e85] {
11
11
  transition: all 0.25s;
12
12
  }
13
13
  .pro-table_search-form-container[data-v-c385cd54] {
@@ -36,23 +36,23 @@
36
36
  .pro-table_column-control_button[data-v-d503f78a] svg {
37
37
  transform: scale(1.2, 1.4);
38
38
  }
39
- .pro-table_header[data-v-c4d455c8] {
39
+ .pro-table_header[data-v-856c096b] {
40
40
  display: flex;
41
41
  align-items: center;
42
42
  justify-content: flex-end;
43
43
  }
44
- .pro-table_header[data-v-c4d455c8]:empty {
44
+ .pro-table_header[data-v-856c096b]:empty {
45
45
  display: none;
46
46
  }
47
- .pro-table_header + .pro-table_header_content[data-v-c4d455c8] {
47
+ .pro-table_header + .pro-table_header_content[data-v-856c096b] {
48
48
  margin-top: 16px;
49
49
  }
50
- .pro-table_header_button-bar[data-v-c4d455c8] {
50
+ .pro-table_header_button-bar[data-v-856c096b] {
51
51
  flex: 1;
52
52
  }
53
- .pro-table_header_toolbar[data-v-c4d455c8] {
53
+ .pro-table_header_toolbar[data-v-856c096b] {
54
54
  margin-left: 12px;
55
55
  }
56
- .pro-table[data-v-c4d455c8] [class*='-pagination'] [class*='-pagination-total-text'] {
56
+ .pro-table[data-v-856c096b] [class*='-pagination'] [class*='-pagination-total-text'] {
57
57
  flex: 1;
58
58
  }
@@ -0,0 +1,35 @@
1
+ import { ComponentVars } from '../types';
2
+ import { ComponentName } from '../../form/constants';
3
+ type ComponentMap = Partial<Record<ComponentName, any>>;
4
+ type Props = {
5
+ /**
6
+ * @description 组件全局配置
7
+ * 可配置所有内置组件和 Pro 组件的默认属性
8
+ * @example { 'input': { placeholder: '请输入' }, 'pro-form': { grid: { gutter: 24 } } }
9
+ */
10
+ componentVars?: ComponentVars;
11
+ /**
12
+ * @description 自定义组件映射
13
+ * 用于替换或扩展内置组件,传入的组件会覆盖默认的同名组件
14
+ * @example { 'input': MyCustomInput, 'select': MyCustomSelect }
15
+ */
16
+ componentMap?: ComponentMap;
17
+ };
18
+ declare function __VLS_template(): {
19
+ attrs: Partial<{}>;
20
+ slots: {
21
+ default?(_: {}): any;
22
+ };
23
+ refs: {};
24
+ rootEl: any;
25
+ };
26
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
35
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"AAmFA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,KAAK,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC;AAOxD,KAAK,KAAK,GAAG;IACX;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAyBF,iBAAS,cAAc;WAoBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { RequiredComponentVars } from '../types';
2
+ import { InjectionKey, Component } from 'vue';
3
+ export declare const INJECT_COMPONENTS: InjectionKey<Partial<Record<string, Component>>>;
4
+ export type InjectConfigEntry<T = any> = {
5
+ injectionKey: InjectionKey<T>;
6
+ default: T;
7
+ };
8
+ export declare const INJECT_CONFIG: {
9
+ [key in keyof RequiredComponentVars]: {
10
+ injectionKey: InjectionKey<RequiredComponentVars[key]>;
11
+ default: RequiredComponentVars[key];
12
+ };
13
+ };
14
+ export declare const getInjectConfig: (key: string) => InjectConfigEntry | undefined;
15
+ export declare const ensureInjectConfig: (key: string) => InjectConfigEntry;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAK9C,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAC1C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CACL,CAAC;AAEhC,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,GAAG,IAAI;IACvC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE;KACzB,GAAG,IAAI,MAAM,qBAAqB,GAAG;QACpC,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;QACvD,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;KACrC;CA4HF,CAAC;AAKF,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,iBAAiB,GAAG,SAKjE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,iBAShD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as ComponentProvider } from './components/index.vue';
2
+ export { type ComponentVars } from './types';
3
+ export default ComponentProvider;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/component-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { GridItemProps, FormItemProps, TableProps } from '../../../shared/ui';
2
+ import { Base, Grid } from '../../form/types';
3
+ import { ProFormProps } from '../../form';
4
+ import { ProTableProps } from '../../table';
5
+ import { AllowedComponentProps } from 'vue';
6
+ import { GetComponentType, ComponentName } from '../../form/constants';
7
+ import { ComponentProps } from 'vue-component-type-helpers';
8
+ type PP<T extends Record<string, any>> = Partial<T & AllowedComponentProps>;
9
+ type FP<T extends Record<string, any>> = Partial<T & Pick<Base, 'valueFormatter' | 'componentContainer' | 'modelProp'> & AllowedComponentProps>;
10
+ /**
11
+ * @qin-ui/antd-vue-pro 全局配置变量类型
12
+ *
13
+ * @description 定义可通过 ProComponentProvider 配置的所有组件默认属性。
14
+ * 支持配置表单、表格、表单项以及所有内置组件的默认属性。
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * // 通过 ProComponentProvider 配置全局默认值
19
+ * const componentVars: ComponentVars = {
20
+ * 'pro-form': {
21
+ * grid: { gutter: 24 },
22
+ * labelCol: { span: 4 },
23
+ * },
24
+ * 'input': {
25
+ * placeholder: '请输入内容',
26
+ * maxlength: 200,
27
+ * },
28
+ * 'select': {
29
+ * placeholder: '请选择',
30
+ * },
31
+ * }
32
+ * ```
33
+ */
34
+ export type RequiredComponentVars = {
35
+ /** ProTable 全局默认属性 */
36
+ 'pro-table': PP<TableProps & Pick<ProTableProps, 'control' | 'searchFormConfig' | 'immediateSearch' | 'addIndexColumn' | 'tableContainer'>>;
37
+ /** ProForm 全局默认属性,grid 必须为 GridProps 对象而非 boolean */
38
+ 'pro-form': PP<Omit<ProFormProps, 'form' | 'grid'> & {
39
+ grid: Exclude<Grid, undefined | boolean>;
40
+ }>;
41
+ /** ProFormItem 全局默认属性 */
42
+ 'pro-form-item': PP<FormItemProps & Pick<GridItemProps, 'span' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'> & Pick<Base, 'formItemContainer'>>;
43
+ /** DatePicker date 模式全局默认属性 */
44
+ 'date-picker.date': FP<ComponentProps<GetComponentType<'date-picker'>>>;
45
+ /** DatePicker week 模式全局默认属性 */
46
+ 'date-picker.week': FP<ComponentProps<GetComponentType<'date-picker'>>>;
47
+ /** DatePicker month 模式全局默认属性 */
48
+ 'date-picker.month': FP<ComponentProps<GetComponentType<'date-picker'>>>;
49
+ /** DatePicker year 模式全局默认属性 */
50
+ 'date-picker.year': FP<ComponentProps<GetComponentType<'date-picker'>>>;
51
+ /** DatePicker quarter 模式全局默认属性 */
52
+ 'date-picker.quarter': FP<ComponentProps<GetComponentType<'date-picker'>>>;
53
+ } & {
54
+ [K in Exclude<ComponentName, 'custom'>]: FP<ComponentProps<GetComponentType<K>>>;
55
+ };
56
+ /**
57
+ * 组件全局配置
58
+ * @description RequiredComponentVars 的 Partial 版本,用于 ProComponentProvider 的 props
59
+ * @public
60
+ */
61
+ export type ComponentVars = Partial<RequiredComponentVars>;
62
+ export {};
63
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,KAAK,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC;AAE5E,KAAK,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,CAC9C,CAAC,GACC,IAAI,CAAC,IAAI,EAAE,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,CAAC,GACjE,qBAAqB,CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,sBAAsB;IACtB,WAAW,EAAE,EAAE,CACb,UAAU,GACR,IAAI,CACF,aAAa,EACX,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,CACnB,CACJ,CAAC;IACF,qDAAqD;IACrD,UAAU,EAAE,EAAE,CACZ,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;QACpC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;KAC1C,CACF,CAAC;IACF,yBAAyB;IACzB,eAAe,EAAE,EAAE,CACjB,aAAa,GACX,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC,GACtE,IAAI,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAClC,CAAC;IAEF,+BAA+B;IAC/B,kBAAkB,EAAE,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACxE,+BAA+B;IAC/B,kBAAkB,EAAE,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACxE,gCAAgC;IAChC,mBAAmB,EAAE,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACzE,+BAA+B;IAC/B,kBAAkB,EAAE,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACxE,kCAAkC;IAClC,qBAAqB,EAAE,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAC5E,GAAG;KAED,CAAC,IAAI,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAE,CACzC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CACpC;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Component } from 'vue';
2
+ type Props = {
3
+ component?: string | Component;
4
+ path?: string;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<Props, {
7
+ getComponentRef: () => any;
8
+ getComponentComputedProps: () => any;
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
10
+ componentRef: unknown;
11
+ }, any>;
12
+ export default _default;
13
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"AA8LA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,KAAK,CAAC;AAeb,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;qCAgH6D,GAAG;;;;AAsGlE,wBAQG"}
@@ -0,0 +1,3 @@
1
+ import { Field } from '../../../types';
2
+ export declare const getInitProps: (field: Field) => Record<string, any>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAW7D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Fields, Grid } from '../../types';
2
+ type Props = {
3
+ grid?: Grid;
4
+ fields?: Fields;
5
+ disabled?: boolean;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
9
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"AAyMA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQhD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;AA0QF,wBAMG"}
@@ -0,0 +1,23 @@
1
+ import { ContainerComponent } from '../../types';
2
+ type Props = {
3
+ component?: ContainerComponent;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
23
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ContainerFragment/index.vue"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AASF,iBAAS,cAAc;WAoCT,OAAO,IAA6B;;yBAZrB,GAAG;yBACH,GAAG;;;;EAgB/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}