@qin-ui/element-plus-pro 1.3.5 → 1.4.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.
- package/AI-CONTEXT.md +26 -2
- package/README.md +41 -30
- package/api.json +69 -38
- package/es/components/component-provider/components/index.vue.d.ts +10 -3
- package/es/components/component-provider/components/index.vue.d.ts.map +1 -1
- package/es/components/component-provider/constants/index.d.ts +22 -4
- package/es/components/component-provider/constants/index.d.ts.map +1 -1
- package/es/components/component-provider/types/index.d.ts +15 -1
- package/es/components/component-provider/types/index.d.ts.map +1 -1
- package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseField/utils/index.d.ts +15 -0
- package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -1
- package/es/components/form/components/BaseFormItem/index.vue.d.ts +3 -1
- package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -1
- package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -1
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
- package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -1
- package/es/components/form/components/index.d.ts +4 -0
- package/es/components/form/components/index.d.ts.map +1 -1
- package/es/components/form/constants/index.d.ts +8 -2
- package/es/components/form/constants/index.d.ts.map +1 -1
- package/es/components/form/hooks/useFields.d.ts.map +1 -1
- package/es/components/form/hooks/useForm.d.ts.map +1 -1
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts +9 -0
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts.map +1 -1
- package/es/components/form/index.d.ts +2 -2
- package/es/components/form/index.d.ts.map +1 -1
- package/es/components/form/types/index.d.ts +65 -50
- package/es/components/form/types/index.d.ts.map +1 -1
- package/es/components/form/utils/fieldKey.d.ts +13 -0
- package/es/components/form/utils/fieldKey.d.ts.map +1 -0
- package/es/components/table/components/ColumnControl.vue.d.ts +1 -1
- package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -1
- package/es/components/table/components/ProTable.vue.d.ts +15 -1
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
- package/es/components/table/components/SearchForm.vue.d.ts +13 -1
- package/es/components/table/components/SearchForm.vue.d.ts.map +1 -1
- package/es/components/table/components/SizeControl.vue.d.ts +7 -2
- package/es/components/table/components/SizeControl.vue.d.ts.map +1 -1
- package/es/components/table/components/TableColumnRenderer.vue.d.ts +14 -14
- package/es/components/table/components/TableColumnRenderer.vue.d.ts.map +1 -1
- package/es/components/table/hooks/index.d.ts +2 -0
- package/es/components/table/hooks/index.d.ts.map +1 -0
- package/es/components/table/{useTable.d.ts → hooks/useTable.d.ts} +3 -3
- package/es/components/table/hooks/useTable.d.ts.map +1 -0
- package/es/components/table/index.d.ts +6 -2
- package/es/components/table/index.d.ts.map +1 -1
- package/es/components/table/types/index.d.ts +16 -12
- package/es/components/table/types/index.d.ts.map +1 -1
- package/es/element-plus-pro.css +14 -14
- package/es/index.d.ts +9 -6
- package/es/index.d.ts.map +1 -1
- package/es/index.js +307 -224
- package/es/index.js.map +1 -1
- package/es/locale/index.d.ts +2 -1
- package/es/locale/index.d.ts.map +1 -1
- package/es/shared/core/index.d.ts +1 -1
- package/es/shared/core/index.d.ts.map +1 -1
- package/es/shared/ui/index.d.ts +20 -2
- package/es/shared/ui/index.d.ts.map +1 -1
- package/package.json +6 -4
- package/src/components/component-provider/components/index.vue +48 -21
- package/src/components/component-provider/constants/index.ts +34 -6
- package/src/components/component-provider/types/index.ts +21 -7
- package/src/components/form/components/BaseField/index.vue +25 -12
- package/src/components/form/components/BaseField/utils/index.ts +16 -1
- package/src/components/form/components/BaseFormItem/index.vue +24 -28
- package/src/components/form/components/ContainerFragment/index.vue +3 -1
- package/src/components/form/components/ProForm/index.vue +42 -22
- package/src/components/form/components/SlotComponent/index.vue +4 -2
- package/src/components/form/components/index.ts +8 -1
- package/src/components/form/constants/index.ts +9 -2
- package/src/components/form/hooks/useFields.ts +5 -2
- package/src/components/form/hooks/useForm.ts +8 -1
- package/src/components/form/hooks/useGroupFieldAttrs.ts +24 -17
- package/src/components/form/index.ts +1 -3
- package/src/components/form/types/index.ts +71 -52
- package/src/components/form/utils/fieldKey.ts +27 -0
- package/src/components/table/components/ColumnControl.vue +16 -6
- package/src/components/table/components/ProTable.vue +183 -93
- package/src/components/table/components/SearchForm.vue +60 -22
- package/src/components/table/components/SizeControl.vue +23 -1
- package/src/components/table/components/TableColumnRenderer.vue +82 -63
- package/src/components/table/hooks/index.ts +1 -0
- package/src/components/table/{useTable.ts → hooks/useTable.ts} +6 -4
- package/src/components/table/index.ts +11 -2
- package/src/components/table/types/index.ts +17 -13
- package/src/index.ts +13 -7
- package/src/locale/index.ts +4 -2
- package/src/shared/core/index.ts +11 -0
- package/src/shared/ui/index.ts +29 -5
- package/tsconfig.json +0 -1
- package/es/components/table/useTable.d.ts.map +0 -1
package/AI-CONTEXT.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
## 安装与使用
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
pnpm add @qin-ui/element-plus-pro # peerDeps: element-plus ^2.
|
|
9
|
+
pnpm add @qin-ui/element-plus-pro # peerDeps: element-plus ^2.14.5, vue ^3.5
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```ts
|
|
@@ -45,7 +45,7 @@ import { ProForm, ProTable, useForm, useTable } from '@qin-ui/element-plus-pro';
|
|
|
45
45
|
|
|
46
46
|
### 隐式默认行为(INJECT_CONFIG,易踩坑)
|
|
47
47
|
|
|
48
|
-
由 `ProComponentProvider` 注入,优先级低于 Field 配置。**不写也有这些默认值,需知晓以免行为与预期不符**;其中 `maxlength` / `max` / `min` / `controls` 属非中性默认(超长输入被静默截断、数值范围受限、步进按钮隐藏),业务要求更高时在 Field 或 `componentVars`
|
|
48
|
+
由 `ProComponentProvider` 注入,优先级低于 Field 配置。**不写也有这些默认值,需知晓以免行为与预期不符**;其中 `maxlength` / `max` / `min` / `controls` 属非中性默认(超长输入被静默截断、数值范围受限、步进按钮隐藏),业务要求更高时在 Field 或 `componentVars` 中显式覆盖。下表为**库内置默认**,项目 Provider 可能已按 key 覆盖部分值,最终以现场读取的实际配置为准(见「项目级覆盖层」):
|
|
49
49
|
|
|
50
50
|
| component | 默认预设 |
|
|
51
51
|
| :-------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -66,6 +66,26 @@ import { ProForm, ProTable, useForm, useTable } from '@qin-ui/element-plus-pro';
|
|
|
66
66
|
> `checkbox-group` / `radio-group` / `slider` / `transfer` 无预设(`{}`)。
|
|
67
67
|
> **占位符由 locale 兜底**:未显式设置 `placeholder` 时按组件类型自动生成(input 类 -> `input.placeholder`,select/cascader/tree-select 类 -> `select.placeholder`,日期/时间类 -> `date-picker.placeholder`,范围类型 -> `date-picker.start`/`date-picker.end` 等),语言随宿主组件库自动切换。
|
|
68
68
|
|
|
69
|
+
### 项目级覆盖层(写码前必查,实时生效)
|
|
70
|
+
|
|
71
|
+
项目 `ProComponentProvider`(通常挂载在 App.vue 或布局组件)的配置介于 Field 属性与上表内置默认之间,优先级为 **Field 属性 > 项目 Provider > 内置默认**。
|
|
72
|
+
|
|
73
|
+
**硬规则:生成任何 Field / Column / ProForm / ProTable / SearchForm 代码前,先全局搜索项目源码(排除 node_modules),读取 Provider 实际配置:**
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
搜索: <ProComponentProvider 挂载点(通常在 App.vue / 布局 / Provider 包装组件)
|
|
77
|
+
Provider 注入面:`data` / `columns` / `loading` 不可经 `componentVars['pro-table']` 配置(由 `:table` 实例、显式 `:data` 与组件自身状态驱动),`form` 不可经 `componentVars['pro-form']` 配置(由显式 `:form` 实例驱动);传入不可注入键时在注入层静默忽略(类型面已限制,不输出告警)。
|
|
78
|
+
|
|
79
|
+
搜索: componentVars 项目覆盖的默认属性(input maxlength、select 配置等)
|
|
80
|
+
搜索: componentMap 注册的自定义组件 / 接管的内置组件
|
|
81
|
+
搜索: :locale= 覆盖的内置文案(查询/重置/展开/占位符等)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- 配置值若抽离到独立文件(如 `:component-vars="providerVars"`),沿 import / 定义语句追到源头读取;
|
|
85
|
+
- `componentMap` 注册的 key 是合法的 `Field.component` 取值,应优先使用项目已注册组件,而非新写;
|
|
86
|
+
- 内置文案以项目 `locale` 覆盖为准,不硬编码默认文案;
|
|
87
|
+
- 全项目搜不到挂载点时,按上表内置默认工作。
|
|
88
|
+
|
|
69
89
|
### 内置文案(locale)
|
|
70
90
|
|
|
71
91
|
内置文案(查询/重置/收起/展开/序号/分页总数/占位符等)走 locale 体系,默认跟随宿主 element-plus 语言自动切换:
|
|
@@ -101,6 +121,8 @@ useForm(true | false) // 重载二:仅拿实例(roo
|
|
|
101
121
|
| `form.deleteField` / `form.appendField` / `form.prependField` / `form.getParentField` | 字段增删查;均支持 `{all:true}`;`appendField(undefined, f)` 末尾追加、`prependField(undefined, f)` 开头插入,入参可为数组 |
|
|
102
122
|
| `form.formRef` | 底层 element-plus Form 实例引用(Ref),`formRef.value?.validate()` / `.resetFields()` |
|
|
103
123
|
|
|
124
|
+
> `useFormData()` 在 `ProForm` 子树内承接**内部兜底实例**的数据 store;`<ProForm :form="form">` 时与 `form.formData` 非同源,需同源请用 `useForm(false)` 或直接用传入实例。
|
|
125
|
+
|
|
104
126
|
### useTable -- 表格实例
|
|
105
127
|
|
|
106
128
|
```ts
|
|
@@ -170,6 +192,7 @@ useTable({ columns, data, pageParam, searchParam, searchFields }); // 数据源
|
|
|
170
192
|
- ❌ 传 SFC 给 `component` 不用 `markRaw`。
|
|
171
193
|
- ❌ 在 ProTable 上忘了传 `:search`,或期望它自动请求 -- 查询由你提供并驱动。
|
|
172
194
|
- ❌ 把 element-plus 当 ant-design-vue -- 列用 `prop` 不是 `dataIndex`,数据源用 `data` 不是 `dataSource`,v-model 用 `modelValue` 不是 `value`。
|
|
195
|
+
- ❌ 不读项目 `ProComponentProvider` 实际配置就写 Field/Column 属性 -- 默认值与组件映射可能已被项目覆盖。
|
|
173
196
|
|
|
174
197
|
## 按需深查
|
|
175
198
|
|
|
@@ -180,3 +203,4 @@ useTable({ columns, data, pageParam, searchParam, searchFields }); // 数据源
|
|
|
180
203
|
- `.agents/skills/element-plus-pro/references/api.md` — 结构化 API 元数据
|
|
181
204
|
- `node_modules/@qin-ui/element-plus-pro/README.md` — 完整用法与进阶示例
|
|
182
205
|
- element-plus 组件属性查阅官方文档:https://element-plus.org
|
|
206
|
+
- 项目注册了自定义 `componentMap` key 时,推荐补 `declare module` 环境类型声明(见 README 方式 3),使 `Field.component` 联合类型包含项目注册的 key
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
## 📦 安装
|
|
27
27
|
|
|
28
|
-
确保您的项目中已安装 `element-plus` (v2.
|
|
28
|
+
确保您的项目中已安装 `element-plus` (v2.14.5+) 和 `vue` (v3.5+):
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
npm i @qin-ui/element-plus-pro
|
|
@@ -219,6 +219,12 @@ ProComponentProvider 内置了一套默认属性预设,**即使不配置 `comp
|
|
|
219
219
|
> `date-picker` 支持按 type 子类型分别预设:`date-picker.date` / `.dates` / `.daterange` / `.datetime` / `.datetimerange` / `.week` / `.month` / `.monthrange` / `.months` / `.year` / `.yearrange` / `.years` 等。
|
|
220
220
|
> `placeholder`(含范围选择器的 `startPlaceholder` / `endPlaceholder`)不在 INJECT_CONFIG 预设内,由 locale 体系提供,可在 Field 配置中显式覆盖。
|
|
221
221
|
|
|
222
|
+
#### 与 AI 编码工具协作
|
|
223
|
+
|
|
224
|
+
> `pro-table` 的 `data` / `columns` / `loading` 与 `pro-form` 的 `form` 不参与 `componentVars` 注入:数据与列由 `:table` 实例(`useTable`)或显式 `:data` 驱动,表单实例由显式 `:form` 传入;传入时在注入层静默忽略(类型面已限制,不输出告警)。
|
|
225
|
+
|
|
226
|
+
属性优先级为 **Field 配置 > Provider 注入(含项目在 `componentVars` / `componentMap` / `locale` 上的覆盖)> 内置默认**。包内 AI 上下文(`AI-CONTEXT.md`)已要求 AI 在生成任何 Field / Column 代码前,先搜索并读取项目 `ProComponentProvider` 的实际配置。执行一次 `npx @qin-ui/element-plus-pro init-ai` 即可让该规则进入项目 `AGENTS.md`,此后项目配置变更无需任何操作,AI 每次会话都读取最新源码。
|
|
227
|
+
|
|
222
228
|
---
|
|
223
229
|
|
|
224
230
|
### 2. ProForm
|
|
@@ -250,7 +256,7 @@ ProComponentProvider 内置了一套默认属性预设,**即使不配置 `comp
|
|
|
250
256
|
| `search` | 触发表格查询的回调函数,需返回 Promise 或直接返回查询数据 | `(params: any) => Promise<any> \| any` | - |
|
|
251
257
|
| `size` | 表格尺寸(v-model) | `string` | - |
|
|
252
258
|
| `loading` | 表格加载状态(v-model) | `boolean` | - |
|
|
253
|
-
| `addIndexColumn` | 是否自动在表格首列插入序号列 | `boolean` | `
|
|
259
|
+
| `addIndexColumn` | 是否自动在表格首列插入序号列 | `boolean` | `true` |
|
|
254
260
|
| `immediateSearch` | 表格挂载时(onMounted)是否立即触发一次 `search` 查询 | `boolean` | `false` |
|
|
255
261
|
| `control` | 是否在表格右上角工具栏中展示尺寸调节和列动态显示控制按钮 | `boolean` | `true` |
|
|
256
262
|
| `searchFormConfig` | 查询表单的布局配置参数 | `SearchFormConfig` | - |
|
|
@@ -259,12 +265,13 @@ ProComponentProvider 内置了一套默认属性预设,**即使不配置 `comp
|
|
|
259
265
|
|
|
260
266
|
#### Slots
|
|
261
267
|
|
|
262
|
-
| 插槽名 | 说明
|
|
263
|
-
| :------------ |
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
| `
|
|
268
|
+
| 插槽名 | 说明 |
|
|
269
|
+
| :------------ | :----------------------------------------------------------------- |
|
|
270
|
+
| `default` | 保留给列渲染器,传入内容不参与渲染(自定义区域请使用下列具名插槽) |
|
|
271
|
+
| `search-form` | 自定义搜索栏表单内容 |
|
|
272
|
+
| `button-bar` | 自定义操作按钮组区域(位于搜索栏下方,表格左上方) |
|
|
273
|
+
| `toolbar` | 自定义工具栏区域(位于表格右上方控制按钮旁) |
|
|
274
|
+
| `table` | 完全自定义渲染表格区域 |
|
|
268
275
|
|
|
269
276
|
#### 数据流
|
|
270
277
|
|
|
@@ -324,6 +331,8 @@ const form = useForm<D>(initFormData?, initFields?, root?)
|
|
|
324
331
|
| `prependField(path, field, opts?)` | 在指定字段前插入新字段(入参可为数组);`undefined` 在开头插入;`{all:true}` 所有匹配前插入 | `(path, field, opts?) => void` |
|
|
325
332
|
| `getParentField(path, opts?)` | 查找父级字段配置;`{all:true}` 返回所有匹配的父级字段 | `(path, opts?) => Field` |
|
|
326
333
|
|
|
334
|
+
> **`useFormData()` 的取值边界**:`ProForm` 在 setup 期会创建一个内部兜底表单实例,`useFormData()`(在 `ProForm` 子树内不传参调用)承接的是**该兜底实例**的数据 store;因此 `<ProForm :form="form">` 场景下 `useFormData().formData` 与 `form.formData` **不是同一对象**,两处写入互不相通。需要与传入实例同源时,请改用 `useForm(false)`(复用注入的表单代理)或直接使用传入的 `form` 实例。未传 `:form` 时两条通路指向同一实例。
|
|
335
|
+
|
|
327
336
|
---
|
|
328
337
|
|
|
329
338
|
### 2. `useTable`
|
|
@@ -382,27 +391,29 @@ const table = useTable<D, T>({
|
|
|
382
391
|
|
|
383
392
|
### 公共基础属性
|
|
384
393
|
|
|
385
|
-
| 属性名 | 说明
|
|
386
|
-
| :------------------- |
|
|
387
|
-
| `path` | 字段标识,需对应数据对象 `formData` 的 key,支持多级嵌套,例如 `address.city`
|
|
388
|
-
| `
|
|
389
|
-
| `
|
|
390
|
-
| `
|
|
391
|
-
| `
|
|
392
|
-
| `
|
|
393
|
-
| `
|
|
394
|
-
| `
|
|
395
|
-
| `
|
|
396
|
-
| `
|
|
397
|
-
| `
|
|
398
|
-
| `
|
|
399
|
-
| `
|
|
400
|
-
| `
|
|
401
|
-
| `
|
|
402
|
-
| `
|
|
403
|
-
| `
|
|
404
|
-
| `
|
|
405
|
-
| `
|
|
394
|
+
| 属性名 | 说明 | 类型 | 默认值 |
|
|
395
|
+
| :------------------- | :--------------------------------------------------------------------------------- | :------------------------------------------------ | :------------- |
|
|
396
|
+
| `path` | 字段标识,需对应数据对象 `formData` 的 key,支持多级嵌套,例如 `address.city` | `string` | - |
|
|
397
|
+
| `prop` | 字段标识(对应 `el-form-item` 的 `prop`),**优先于 `path`**;校验与取值均以它为准 | `string \| string[]` | - |
|
|
398
|
+
| `name` | 透传给字段控件作为其原生 `name` 属性(不作为字段标识) | `string` | - |
|
|
399
|
+
| `label` | 字段中文标签,支持字符串或直接传入 VNode 组件进行自定义 | `string \| Component \| Slot` | - |
|
|
400
|
+
| `component` | 调用的表单项组件的类型,支持内置类型键名或直接传入自定义 Vue 组件 | `string \| Component` | `'input'` |
|
|
401
|
+
| `hidden` | 字段是否被隐藏(在 DOM 中不渲染),支持 Ref/Computed 响应式 | `boolean \| Ref<boolean> \| ComputedRef<boolean>` | `false` |
|
|
402
|
+
| `disabled` | 组件的禁用状态,支持 Ref/Computed 响应式 | `boolean \| Ref<boolean>` | `false` |
|
|
403
|
+
| `rules` | 字段数据校验规则,遵循 Element Plus 表单校验格式 | `Rule[]` | - |
|
|
404
|
+
| `span` | 栅格占位宽度(在 ProForm 开启 `grid` 后有效) | `number` | - |
|
|
405
|
+
| `formItemStyle` | 挂载在外部 `el-form-item` 节点上的额外 CSS 样式属性 | `StyleValue` | - |
|
|
406
|
+
| `formItemClass` | 挂载在外部 `el-form-item` 节点上的自定义类名 | `ClassValue` | - |
|
|
407
|
+
| `formItemContainer` | 针对该表单项的最外层 DOM 包裹组件 | `Component` | - |
|
|
408
|
+
| `formItemDataAttrs` | 附加在 `el-form-item` DOM 节点上的自定义 data 属性 | `Record<string, string>` | - |
|
|
409
|
+
| `componentStyle` | 直接传递给内部表单输入组件的额外 CSS 样式属性 | `StyleValue` | - |
|
|
410
|
+
| `componentClass` | 直接传递给内部表单输入组件的自定义类名 | `ClassValue` | - |
|
|
411
|
+
| `componentContainer` | 针对表单输入组件的包裹组件 | `Component` | - |
|
|
412
|
+
| `componentDataAttrs` | 附加在内部输入组件 DOM 节点上的自定义 data 属性 | `Record<string, string>` | - |
|
|
413
|
+
| `valueFormatter` | 字段值转换处理器,可在输入更新或提取数据时做 get/set 转换 | `ValueFormatter` | - |
|
|
414
|
+
| `modelProp` | 双向绑定的数据属性名称(默认为 `modelValue`) | `string` | `'modelValue'` |
|
|
415
|
+
| `fields` | 嵌套子表单项的 Schema 数组配置 | `Field[]` | - |
|
|
416
|
+
| `grid` | 针对当前嵌套子表单项所使用的网格布局参数(仅当有 `fields` 时有效) | `boolean \| GridProps` | - |
|
|
406
417
|
|
|
407
418
|
#### `valueFormatter` 字段值转换
|
|
408
419
|
|
|
@@ -588,7 +599,7 @@ declare module '@qin-ui/element-plus-pro' {
|
|
|
588
599
|
| 依赖包名称 | 推荐版本要求 |
|
|
589
600
|
| :------------- | :----------- |
|
|
590
601
|
| `vue` | `^3.5.0` |
|
|
591
|
-
| `element-plus` | `^2.
|
|
602
|
+
| `element-plus` | `^2.14.5` |
|
|
592
603
|
|
|
593
604
|
---
|
|
594
605
|
|
package/api.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-
|
|
2
|
+
"generatedAt": "2026-10-26T06:21:55.477Z",
|
|
3
3
|
"name": "@qin-ui/element-plus-pro",
|
|
4
4
|
"api": [
|
|
5
5
|
{
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "component",
|
|
8
8
|
"package": "@qin-ui/element-plus-pro",
|
|
9
9
|
"signature": "<ProComponentProvider>",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "全局配置提供者组件\n用于在组件树的顶层配置所有子组件的全局默认属性。\n支持配置 ProForm、ProTable、ProFormItem 以及所有内置组件的默认属性。",
|
|
11
11
|
"params": [
|
|
12
12
|
{
|
|
13
13
|
"name": "componentVars",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"name": "componentMap",
|
|
20
20
|
"type": "Record<ComponentName, any>",
|
|
21
21
|
"optional": true,
|
|
22
|
-
"description": "
|
|
22
|
+
"description": "自定义组件映射,用于替换或扩展内置组件"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "locale",
|
|
@@ -29,22 +29,29 @@
|
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
31
|
"examples": [
|
|
32
|
-
"```vue\n<ProComponentProvider\n:componentVars=\"{ 'input': { placeholder: '请输入' } }\"\n>\n<ProForm :form=\"form\" />\n</ProComponentProvider>\n```"
|
|
32
|
+
"```vue\n<template>\n<ProComponentProvider\n:componentVars=\"{\n'pro-form': { grid: { gutter: 24 } },\n'input': { placeholder: '请输入', maxlength: 200 },\n'select': { placeholder: '请选择' },\n}\"\n>\n<ProForm :form=\"form\" />\n</ProComponentProvider>\n</template>\n```"
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
|
+
{
|
|
36
|
+
"name": "ComponentVars",
|
|
37
|
+
"type": "type",
|
|
38
|
+
"package": "@qin-ui/element-plus-pro",
|
|
39
|
+
"signature": "export type ComponentVars = Partial<RequiredComponentVars>;",
|
|
40
|
+
"description": "组件全局配置\nRequiredComponentVars 的 Partial 版本,用于 ProComponentProvider 的 props"
|
|
41
|
+
},
|
|
35
42
|
{
|
|
36
43
|
"name": "ContainerFragment",
|
|
37
44
|
"type": "component",
|
|
38
45
|
"package": "@qin-ui/element-plus-pro",
|
|
39
46
|
"signature": "<ContainerFragment>",
|
|
40
|
-
"description": "
|
|
47
|
+
"description": "容器分片渲染组件\n用于动态渲染表单行或表单项的外部包裹容器(例如 Grid 行、Col 列等布局容器)"
|
|
41
48
|
},
|
|
42
49
|
{
|
|
43
50
|
"name": "ProForm",
|
|
44
51
|
"type": "component",
|
|
45
52
|
"package": "@qin-ui/element-plus-pro",
|
|
46
53
|
"signature": "<ProForm>",
|
|
47
|
-
"description": "
|
|
54
|
+
"description": "配置驱动表单组件\n架构设计说明 (Architecture Overview)\n[ 数据层 (Core) ] => [ 绑定层 (ProForm) ] => [ 渲染层 (BaseFormItem / BaseField) ]\n1. 数据隔离:ProForm 本身不负责存储和管理表单状态,所有核心状态(formData, fields, 校验规则)\n均交由底层的 `useForm`(@qin-ui/pro-components-core)驱动。\n2. 上下文透传:通过 `provide` 将核心状态下发给子组件。\n3. 递归渲染:网格布局和具体字段的解析交由 `<BaseFormItem>` 递归完成。\n通过配置驱动的方式快速构建表单,支持:\n- 字段联动(通过 setField、watch 等实现)\n- 嵌套字段(通过 fields 递归配置)\n- 自定义组件(通过 component 属性和 custom 类型)\n- 网格布局(通过 grid 属性)\n- 动态插槽(以字段 path 命名的插槽)\n- 全局配置注入(通过 ProComponentProvider)",
|
|
48
55
|
"params": [
|
|
49
56
|
{
|
|
50
57
|
"name": "form",
|
|
@@ -56,13 +63,22 @@
|
|
|
56
63
|
"name": "grid",
|
|
57
64
|
"type": "boolean | GridProps",
|
|
58
65
|
"optional": true,
|
|
59
|
-
"description": "
|
|
66
|
+
"description": "是否启用网格布局;未提供时回退 Provider 注入的 `grid` 配置"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "...attrs",
|
|
70
|
+
"type": "...FormProps",
|
|
71
|
+
"optional": false,
|
|
72
|
+
"description": "Element Plus Form 组件的其他属性"
|
|
60
73
|
}
|
|
61
74
|
],
|
|
62
75
|
"typeParams": [
|
|
63
76
|
{
|
|
64
77
|
"name": "F"
|
|
65
78
|
}
|
|
79
|
+
],
|
|
80
|
+
"examples": [
|
|
81
|
+
"```vue\n<template>\n<ProForm :form=\"form\" @submit=\"handleSubmit\">\n<template #name=\"{ value, disabled }\">\n<el-input :model-value=\"value\" :disabled=\"disabled\" />\n</template>\n</ProForm>\n</template>\n```"
|
|
66
82
|
]
|
|
67
83
|
},
|
|
68
84
|
{
|
|
@@ -70,7 +86,7 @@
|
|
|
70
86
|
"type": "component",
|
|
71
87
|
"package": "@qin-ui/element-plus-pro",
|
|
72
88
|
"signature": "<SlotComponent>",
|
|
73
|
-
"description": "
|
|
89
|
+
"description": "插槽渲染辅助组件\n用于在表单或表格的自定义插槽中动态渲染外部传入的 VNode、渲染函数、组件定义对象或静态字符串"
|
|
74
90
|
},
|
|
75
91
|
{
|
|
76
92
|
"name": "ComponentMap",
|
|
@@ -189,9 +205,12 @@
|
|
|
189
205
|
"name": "Field",
|
|
190
206
|
"type": "type",
|
|
191
207
|
"package": "@qin-ui/element-plus-pro",
|
|
192
|
-
"signature": "export type Field<\n C extends ComponentName = ComponentName,\n D extends Data = Data,\n>
|
|
193
|
-
"description": "
|
|
208
|
+
"signature": "export type Field<\n C extends ComponentName = ComponentName,\n D extends Data = Data,\n> = (\n | (FieldTypeMap<D>[C] &",
|
|
209
|
+
"description": "字段配置类型,包含字段属性、响应式取值与宿主组件 Props",
|
|
194
210
|
"typeParams": [
|
|
211
|
+
{
|
|
212
|
+
"name": "C"
|
|
213
|
+
},
|
|
195
214
|
{
|
|
196
215
|
"name": "D"
|
|
197
216
|
}
|
|
@@ -202,38 +221,11 @@
|
|
|
202
221
|
"type": "type",
|
|
203
222
|
"package": "@qin-ui/element-plus-pro",
|
|
204
223
|
"signature": "export type Fields<D extends Data = Data> = Array<Field<ComponentName, D>>;",
|
|
205
|
-
"description": "
|
|
206
|
-
"typeParams": [
|
|
207
|
-
{
|
|
208
|
-
"name": "D"
|
|
209
|
-
}
|
|
210
|
-
]
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"name": "ColumnScope",
|
|
214
|
-
"type": "type",
|
|
215
|
-
"package": "@qin-ui/element-plus-pro",
|
|
216
|
-
"signature": "export type ColumnScope<D extends Data = Data> =",
|
|
217
|
-
"description": "Element Plus 表格列作用域",
|
|
218
|
-
"typeParams": [
|
|
219
|
-
{
|
|
220
|
-
"name": "D"
|
|
221
|
-
}
|
|
222
|
-
]
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "Column",
|
|
226
|
-
"type": "type",
|
|
227
|
-
"package": "@qin-ui/element-plus-pro",
|
|
228
|
-
"signature": "export type Column<D extends Data = Data> = Partial<\n Omit<ColumnType<any>, 'prop' | 'property' | 'children' | 'render'>\n> &",
|
|
229
|
-
"description": "基于 Element Plus 的 ColumnType 列类型,并添加:\n- prop 作为主要字段(Element Plus 使用 prop 而非 dataIndex)\n- key 作为辅助标识\n- hidden 属性\n- render 自定义渲染函数",
|
|
224
|
+
"description": "字段配置数组类型",
|
|
230
225
|
"typeParams": [
|
|
231
226
|
{
|
|
232
227
|
"name": "D"
|
|
233
228
|
}
|
|
234
|
-
],
|
|
235
|
-
"examples": [
|
|
236
|
-
"```ts\ninterface User { name: string; age: number }\n\nconst columns: Columns<User> = [\n{ prop: 'name', label: '姓名', width: 120 },\n{ prop: 'age', label: '年龄', width: 80 },\n]\n```"
|
|
237
229
|
]
|
|
238
230
|
},
|
|
239
231
|
{
|
|
@@ -310,6 +302,45 @@
|
|
|
310
302
|
"examples": [
|
|
311
303
|
"```ts\ninterface SearchParams { keyword: string }\ninterface User { name: string; age: number; email: string }\n\nconst table = useTable<SearchParams, User>({\ncolumns: [\n{ prop: 'name', title: '姓名', width: 120 },\n{ prop: 'age', title: '年龄', width: 80 },\n],\ndata: [],\npageParam: { current: 1, pageSize: 20, total: 0 },\nsearchParam: { keyword: '' },\nsearchFields: [\n{ path: 'keyword', label: '关键词', component: 'input' },\n],\n})\n```"
|
|
312
304
|
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "ColumnScope",
|
|
308
|
+
"type": "type",
|
|
309
|
+
"package": "@qin-ui/element-plus-pro",
|
|
310
|
+
"signature": "export type ColumnScope<D extends Data = Data> =",
|
|
311
|
+
"description": "Element Plus 表格列作用域",
|
|
312
|
+
"typeParams": [
|
|
313
|
+
{
|
|
314
|
+
"name": "D"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "Column",
|
|
320
|
+
"type": "type",
|
|
321
|
+
"package": "@qin-ui/element-plus-pro",
|
|
322
|
+
"signature": "export type Column<D extends Data = Data> = Partial<\n Omit<ColumnType<any>, 'prop' | 'property' | 'children' | 'render'>\n> &",
|
|
323
|
+
"description": "表格列配置类型,基于宿主 ColumnType 扩展\n在宿主列类型之上新增:\n- prop 作为主要字段(Element Plus 使用 prop 而非 dataIndex)\n- key 作为辅助标识\n- hidden 属性\n- render 自定义渲染函数",
|
|
324
|
+
"typeParams": [
|
|
325
|
+
{
|
|
326
|
+
"name": "D"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
"examples": [
|
|
330
|
+
"```ts\ninterface User { name: string; age: number }\n\nconst columns: Columns<User> = [\n{ prop: 'name', label: '姓名', width: 120 },\n{ prop: 'age', label: '年龄', width: 80 },\n]\n```"
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "Columns",
|
|
335
|
+
"type": "type",
|
|
336
|
+
"package": "@qin-ui/element-plus-pro",
|
|
337
|
+
"signature": "export type Columns<D extends Data = Data> = Array<Column<D>>;",
|
|
338
|
+
"description": "表格列配置数组类型",
|
|
339
|
+
"typeParams": [
|
|
340
|
+
{
|
|
341
|
+
"name": "D"
|
|
342
|
+
}
|
|
343
|
+
]
|
|
313
344
|
}
|
|
314
345
|
]
|
|
315
346
|
}
|
|
@@ -3,13 +3,20 @@ import { ComponentName } from '../../form/constants';
|
|
|
3
3
|
import { ProLocale } from '../../../locale';
|
|
4
4
|
type ComponentMap = Partial<Record<ComponentName, any>>;
|
|
5
5
|
type Props = {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* 组件全局配置,可配置所有内置组件和 Pro 组件的默认属性
|
|
8
|
+
* @example { 'input': { placeholder: '请输入' }, 'pro-form': { grid: { gutter: 24 } } }
|
|
9
|
+
*/
|
|
7
10
|
componentVars?: ComponentVars;
|
|
8
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* 自定义组件映射:用于替换或扩展内置组件,传入的组件会覆盖默认的同名组件
|
|
13
|
+
* @example { 'input': MyCustomInput, 'select': MyCustomSelect }
|
|
14
|
+
*/
|
|
9
15
|
componentMap?: ComponentMap;
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
17
|
+
* 内置文案覆盖:可覆盖任意 locale 文案(如查询/重置/序号/占位符等),
|
|
12
18
|
* 未覆盖的文案默认跟随宿主组件库语言自动切换
|
|
19
|
+
* @example { 'table.query': '搜索' }
|
|
13
20
|
*/
|
|
14
21
|
locale?: Partial<ProLocale>;
|
|
15
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEpE,KAAK,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC;AAOxD,KAAK,KAAK,GAAG;IACX;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7B,CAAC;AA0EF,iBAAS,cAAc;WAoBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;mBAzHH,aAAa;kBAKd,YAAY;YAMlB,OAAO,CAAC,SAAS,CAAC;6EAqH3B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { RequiredComponentVars } from '../types';
|
|
2
2
|
import { InjectionKey, Component, ComputedRef } from 'vue';
|
|
3
|
+
/** 全量 componentVars 注入通道:运行期新增的自定义组件键由此读取(按组件名取配置) */
|
|
4
|
+
export declare const INJECT_COMPONENT_VARS: InjectionKey<ComputedRef<Record<string, any> | undefined> | Record<string, any>>;
|
|
5
|
+
/** 注入项配置:注入 key、内置默认值与不可注入键清单 */
|
|
3
6
|
export type InjectConfigEntry<T = any> = {
|
|
4
7
|
injectionKey: InjectionKey<T>;
|
|
5
8
|
default: T;
|
|
9
|
+
/** 不接受 Provider 注入的键,注入层静默剔除 */
|
|
10
|
+
ignoreProps?: readonly string[];
|
|
6
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* 注入项配置表:键为内置组件名与 `pro-*` 组件名,值为注入 key、内置默认值与不可注入键清单
|
|
14
|
+
*/
|
|
7
15
|
export declare const INJECT_CONFIG: {
|
|
8
|
-
[key in keyof RequiredComponentVars]:
|
|
9
|
-
injectionKey: InjectionKey<RequiredComponentVars[key]>;
|
|
10
|
-
default: RequiredComponentVars[key];
|
|
11
|
-
};
|
|
16
|
+
[key in keyof RequiredComponentVars]: InjectConfigEntry<RequiredComponentVars[key]>;
|
|
12
17
|
};
|
|
18
|
+
/** componentMap 注入 key:BaseField 解析组件时优先取用 */
|
|
13
19
|
export declare const INJECT_COMPONENTS: InjectionKey<ComputedRef<Partial<Record<string, Component>> | undefined> | Partial<Record<string, Component>>>;
|
|
20
|
+
/**
|
|
21
|
+
* 读取注入项配置
|
|
22
|
+
*
|
|
23
|
+
* @param {string} key - 组件名或自定义注入键
|
|
24
|
+
* @returns {InjectConfigEntry | undefined} 内置或动态注入项配置,未注册时返回 undefined
|
|
25
|
+
*/
|
|
14
26
|
export declare const getInjectConfig: (key: string) => InjectConfigEntry | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* 读取注入项配置,未注册时按组件名补建动态注入项
|
|
29
|
+
*
|
|
30
|
+
* @param {string} key - 组件名或自定义注入键
|
|
31
|
+
* @returns {InjectConfigEntry} 已存在或新建的注入项配置
|
|
32
|
+
*/
|
|
15
33
|
export declare const ensureInjectConfig: (key: string) => InjectConfigEntry;
|
|
16
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACxC,CAAC;AAE7B,iCAAiC;AACjC,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,GAAG,IAAI;IACvC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC;IACX,gCAAgC;IAChC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE;KACzB,GAAG,IAAI,MAAM,qBAAqB,GAAG,iBAAiB,CACrD,qBAAqB,CAAC,GAAG,CAAC,CAC3B;CAwKF,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,EAAE,YAAY,CACxC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,GAC3D,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CACP,CAAC;AAKhC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,iBAAiB,GAAG,SAKjE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,iBAShD,CAAC"}
|
|
@@ -9,8 +9,16 @@ import { ColumnControlConfig } from '../../table/types';
|
|
|
9
9
|
type PP<T extends Record<string, any>> = Partial<T & AllowedComponentProps>;
|
|
10
10
|
type FP<T extends Record<string, any>> = Partial<T & Pick<Base, 'valueFormatter' | 'componentContainer' | 'modelProp' | 'componentClass' | 'componentStyle'> & AllowedComponentProps>;
|
|
11
11
|
type DatePickerType = NonNullable<ComponentProps<typeof DatePicker>['type']>;
|
|
12
|
+
/**
|
|
13
|
+
* 全局配置的完整键集合(ComponentVars 的必填形态):键为内置组件名与 `pro-*` 组件名
|
|
14
|
+
*/
|
|
12
15
|
export type RequiredComponentVars = {
|
|
13
|
-
|
|
16
|
+
/**
|
|
17
|
+
* ProTable 全局默认属性
|
|
18
|
+
*
|
|
19
|
+
* @description `data` 不参与全局注入:由 `:table` 实例(`useTable`)或显式 `:data` 驱动;`columns` / `loading` 非本注入项的类型面成员,传入时在注入层忽略。
|
|
20
|
+
*/
|
|
21
|
+
'pro-table': PP<Omit<TableProps, 'data'> & {
|
|
14
22
|
pagination?: false | Partial<PaginationProps>;
|
|
15
23
|
control?: boolean | {
|
|
16
24
|
sizeControl?: boolean;
|
|
@@ -24,6 +32,7 @@ export type RequiredComponentVars = {
|
|
|
24
32
|
addIndexColumn?: boolean;
|
|
25
33
|
tableContainer?: ContainerComponent | false;
|
|
26
34
|
}>;
|
|
35
|
+
/** ProForm 全局默认属性,grid 必须为 GridProps 对象而非 boolean */
|
|
27
36
|
'pro-form': PP<Omit<ProFormProps, 'form' | 'grid'> & {
|
|
28
37
|
grid?: Exclude<Grid, undefined | boolean>;
|
|
29
38
|
}>;
|
|
@@ -35,6 +44,11 @@ export type RequiredComponentVars = {
|
|
|
35
44
|
} & {
|
|
36
45
|
[K in Exclude<ComponentName, 'custom'>]: FP<ComponentProps<GetComponentType<K>>>;
|
|
37
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* 组件全局配置
|
|
49
|
+
* @description RequiredComponentVars 的 Partial 版本,用于 ProComponentProvider 的 props
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
38
52
|
export type ComponentVars = Partial<RequiredComponentVars>;
|
|
39
53
|
export {};
|
|
40
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/types/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"AAuPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,KAAK,CAAC;AA0Bb,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;qCAwJ6D,GAAG;;UAzJzD,MAAM;eADD,MAAM,GAAG,SAAS;;;;AAqQhC,wBASG"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { Field } from '../../../types';
|
|
2
2
|
type LocaleT = (key: string, params?: Record<string, string | number>) => string;
|
|
3
|
+
/**
|
|
4
|
+
* 组件初始属性:以内置默认值为底,按下发组件名补默认占位符文案
|
|
5
|
+
*
|
|
6
|
+
* @description 组件名由 `component` 与 `type` 拼接(如 `input.password`);`component` 非字符串时返回空记录。
|
|
7
|
+
* @param {Field} field - 字段配置
|
|
8
|
+
* @param {Record<string, any>} injectProps - Provider 下发的组件默认属性
|
|
9
|
+
* @param {LocaleT} t - 取文案的翻译函数
|
|
10
|
+
* @returns {Record<string, any>} 组件初始属性(键值均来自注入配置与默认文案)
|
|
11
|
+
*/
|
|
3
12
|
export declare const getInitProps: (field: Field, injectProps: Record<string, any> | undefined, t: LocaleT) => Record<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* 未识别组件名的降级告警
|
|
15
|
+
*
|
|
16
|
+
* @description 同一组件名仅告警一次,提示注册 componentMap 或 ProComponentProvider。
|
|
17
|
+
* @param {string} name - 未识别的组件类型名
|
|
18
|
+
*/
|
|
4
19
|
export declare function warnUnknownComponent(name: string): void;
|
|
5
20
|
export {};
|
|
6
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,KAAK,OAAO,GAAG,CACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AAwDZ;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAK,EACrC,GAAG,OAAO,KACT,MAAM,CAAC,MAAM,EAAE,GAAG,CAOpB,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,QAMhD"}
|
|
@@ -2,10 +2,12 @@ import { Fields, Grid } from '../../types';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
grid?: Grid;
|
|
4
4
|
fields?: Fields;
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
|
-
|
|
8
|
+
disabled: boolean;
|
|
8
9
|
fields: Fields;
|
|
10
|
+
grid: Grid;
|
|
9
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
12
|
export default _default;
|
|
11
13
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"AAwPA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAShD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;cADW,OAAO;YADT,MAAM;UADR,IAAI;;AA6Qb,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ContainerFragment/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ContainerFragment/index.vue"],"names":[],"mappings":"AA4BA;;;;;;;GAOG;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"AAiLA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EASL,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAIb,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAOpD,OAAO,EAAW,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;yBAExC,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAC1C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAmLO,mBAAmB,CAAC;eA7KnB,IAAI;eACJ,CAAC;0DA4KoF,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;wDA3GgC,CAAC;;;;mBAEjB,OAAO;;iBAGwB,IAAI;8CALnB,CAAC;;;;mBAEjB,OAAO;;iBAGwB,IAAI;;UAwGvD,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA9LzE,wBA8L4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/SlotComponent/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/SlotComponent/index.vue"],"names":[],"mappings":"AAkCA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B,CAAC;;AA2DF,wBAMG"}
|