@qin-ui/element-plus-pro 1.0.3 → 1.0.4

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/api.json ADDED
@@ -0,0 +1,222 @@
1
+ {
2
+ "generatedAt": "2026-05-26T08:14:28.580Z",
3
+ "name": "@qin-ui/element-plus-pro",
4
+ "api": [
5
+ {
6
+ "name": "ProComponentProvider",
7
+ "type": "component",
8
+ "package": "@qin-ui/element-plus-pro",
9
+ "signature": "<ProComponentProvider>",
10
+ "description": "@qin-ui/element-plus-pro 全局配置提供者组件\n用于在组件树的顶层配置所有子组件的全局默认属性。",
11
+ "examples": [
12
+ "```vue\n<ProComponentProvider\n:componentVars=\"{ 'input': { placeholder: '请输入' } }\"\n>\n<ProForm :form=\"form\" :fields=\"fields\" />\n</ProComponentProvider>\n```"
13
+ ]
14
+ },
15
+ {
16
+ "name": "ProForm",
17
+ "type": "component",
18
+ "package": "@qin-ui/element-plus-pro",
19
+ "signature": "<ProForm>",
20
+ "description": "@qin-ui/element-plus-pro 配置驱动表单组件\n通过配置驱动的方式快速构建表单,支持:\n- 字段联动、嵌套字段、自定义组件、网格布局",
21
+ "typeParams": [
22
+ {
23
+ "name": "F"
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ "name": "ContainerFragment",
29
+ "type": "component",
30
+ "package": "@qin-ui/element-plus-pro",
31
+ "signature": "<ContainerFragment>",
32
+ "description": "容器分片渲染组件。用于动态渲染表单行或表单项的外部包裹容器(例如 Grid 行、Col 列等布局容器)。"
33
+ },
34
+ {
35
+ "name": "SlotComponent",
36
+ "type": "component",
37
+ "package": "@qin-ui/element-plus-pro",
38
+ "signature": "<SlotComponent>",
39
+ "description": "插槽渲染辅助组件。用于在表单或表格的自定义插槽中动态渲染外部传入的 VNode、渲染函数或静态字符串。"
40
+ },
41
+ {
42
+ "name": "ComponentMap",
43
+ "type": "interface",
44
+ "package": "@qin-ui/element-plus-pro",
45
+ "signature": "export interface ComponentMap {}",
46
+ "description": "组件映射扩展接口\n暴露给外部扩充自定义组件类型的接口。\n用户可通过 TypeScript 的声明合并(module augmentation)添加自定义组件。",
47
+ "examples": [
48
+ "```ts\ndeclare module '@qin-ui/element-plus-pro' {\ninterface ComponentMap {\n'my-custom-input': typeof MyCustomInput;\n}\n}\n```"
49
+ ]
50
+ },
51
+ {
52
+ "name": "ComponentName",
53
+ "type": "type",
54
+ "package": "@qin-ui/element-plus-pro",
55
+ "signature": "export type ComponentName =\n | keyof BaseComponentMap\n | keyof ComponentMap\n | 'custom';",
56
+ "description": "组件名称联合类型\n所有支持的组件名称"
57
+ },
58
+ {
59
+ "name": "useFormData",
60
+ "type": "function",
61
+ "package": "@qin-ui/element-plus-pro",
62
+ "signature": "export const useFormData = <D extends Data = Data>(\n initFormData?: ExtendWithAny<DeepPartial<D>>\n) =>",
63
+ "description": "表单数据处理 Hook\n提供响应式表单数据的管理能力,支持:\n- 响应式数据存储(基于 Vue reactive)\n- 深层路径读写(支持点号分隔,如 'address.city')\n- 类型安全的路径提示(传入泛型 D 后,path 参数可获得类型推导)\n- 父子表单自动注入(非根表单会从注入中获取数据)",
64
+ "returns": "{Function} .setFormData(path, value) - 设置指定路径的数据",
65
+ "typeParams": [
66
+ {
67
+ "name": "D"
68
+ }
69
+ ],
70
+ "examples": [
71
+ "```ts\ninterface User { name: string; age: number; address: { city: string } }\n\nconst { formData, getFormData, setFormData } = useFormData<User>({\nname: '张三',\naddress: { city: '北京' }\n})\n\n// 读取\ngetFormData('name') // '张三'\ngetFormData('address.city') // '北京'\nformData.name // '张三'(响应式)\n\n// 设置\nsetFormData('name', '李四')\nsetFormData('address.city', '上海')\nsetFormData({ name: '王五', age: 30 }) // 批量覆盖\nsetFormData(prev => ({ ...prev, name: '赵六' })) // 函数式更新\n```"
72
+ ]
73
+ },
74
+ {
75
+ "name": "useFields",
76
+ "type": "function",
77
+ "package": "@qin-ui/element-plus-pro",
78
+ "signature": "export const useFields = _useFields as",
79
+ "description": "类型安全的 re-export。将 core useFields 的泛型参数绑定为本地类型:\n- 字段类型 F → Field<ComponentName, D>(支持 Element Plus 组件类型推导)\n- FormItem 实例 → Element Plus 的 FormItemInstance",
80
+ "typeParams": [
81
+ {
82
+ "name": "D"
83
+ }
84
+ ],
85
+ "examples": [
86
+ "```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```"
87
+ ]
88
+ },
89
+ {
90
+ "name": "UseFields",
91
+ "type": "type",
92
+ "package": "@qin-ui/element-plus-pro",
93
+ "signature": "export type UseFields<D extends Data = Data> = ReturnType<typeof useFields<D>>;",
94
+ "description": "useFields 返回值类型,固定为本地 Fields<D>"
95
+ },
96
+ {
97
+ "name": "Form",
98
+ "type": "type",
99
+ "package": "@qin-ui/element-plus-pro",
100
+ "signature": "export type Form<\n D extends Data = Data,\n F extends Field<ComponentName, D> = Field<ComponentName, D>,\n> = _Form<D, F, FormInstance>;",
101
+ "description": "在 core Form 类型的基础上:\n1. 将字段类型 F 默认绑定为本地 Field<ComponentName, D>,支持 Element Plus 所有内置组件类型\n2. 将底层表单实例 I 绑定为 Element Plus 的 FormInstance,使 formRef 获得完整的类型提示",
102
+ "typeParams": [
103
+ {
104
+ "name": "D"
105
+ },
106
+ {
107
+ "name": "F"
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "name": "useForm",
113
+ "type": "function",
114
+ "package": "@qin-ui/element-plus-pro",
115
+ "signature": "export const useForm = _useForm as",
116
+ "description": "创建 @qin-ui/element-plus-pro 表单实例的 Hook\n类型安全的 re-export。将 core useForm 的泛型参数绑定为本地类型:\n- 字段类型 F → Field<ComponentName, D>(支持 Element Plus 组件类型推导)\n- 表单实例 → Element Plus 的 FormInstance",
117
+ "typeParams": [
118
+ {
119
+ "name": "D"
120
+ }
121
+ ],
122
+ "examples": [
123
+ "```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]\n)\n```"
124
+ ]
125
+ },
126
+ {
127
+ "name": "useFormRef",
128
+ "type": "function",
129
+ "package": "@qin-ui/element-plus-pro",
130
+ "signature": "export const useFormRef = _useFormRef as",
131
+ "description": "类型安全的 re-export。将 core useFormRef 的泛型参数绑定为 Element Plus 的 FormInstance,\n使 formRef 获取到完整的 Element Plus Form 组件 API 类型提示。",
132
+ "returns": "{Function} .setFormRef(inst) - 设置表单组件实例",
133
+ "examples": [
134
+ "```ts\nconst { formRef, setFormRef } = useFormRef()\nawait formRef.value?.validate()\nformRef.value?.resetFields()\n```"
135
+ ]
136
+ },
137
+ {
138
+ "name": "Field",
139
+ "type": "type",
140
+ "package": "@qin-ui/element-plus-pro",
141
+ "signature": "export type Field<\n C extends ComponentName = ComponentName,\n D extends Data = Data,\n> =\n | (FieldTypeMap<D>[C] &",
142
+ "description": "字段配置类型,包含所有字段属性和响应式支持",
143
+ "typeParams": [
144
+ {
145
+ "name": "D"
146
+ }
147
+ ]
148
+ },
149
+ {
150
+ "name": "Fields",
151
+ "type": "type",
152
+ "package": "@qin-ui/element-plus-pro",
153
+ "signature": "export type Fields<D extends Data = Data> = Array<Field<ComponentName, D>>;",
154
+ "description": "字段数组类型",
155
+ "typeParams": [
156
+ {
157
+ "name": "D"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "name": "ColumnScope",
163
+ "type": "type",
164
+ "package": "@qin-ui/element-plus-pro",
165
+ "signature": "export type ColumnScope<D extends Data = Data> =",
166
+ "description": "Element Plus 表格列作用域",
167
+ "typeParams": [
168
+ {
169
+ "name": "D"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "name": "Column",
175
+ "type": "type",
176
+ "package": "@qin-ui/element-plus-pro",
177
+ "signature": "export type Column<D extends Data = Data> = Partial<\n Omit<ColumnType<any>, 'prop' | 'property' | 'children' | 'render'>\n> &",
178
+ "description": "基于 Element Plus 的 ColumnType 列类型,并添加:\n- prop 作为主要字段(Element Plus 使用 prop 而非 dataIndex)\n- key 作为辅助标识\n- hidden 属性\n- render 自定义渲染函数",
179
+ "typeParams": [
180
+ {
181
+ "name": "D"
182
+ }
183
+ ],
184
+ "examples": [
185
+ "```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```"
186
+ ]
187
+ },
188
+ {
189
+ "name": "Table",
190
+ "type": "type",
191
+ "package": "@qin-ui/element-plus-pro",
192
+ "signature": "export type Table<\n D extends Data = Data,\n T extends Data = ExtendWithAny<D>,\n> = Omit<_Table<D, T, Column<T>>, 'dataSource'> &",
193
+ "description": "在 core Table 类型的基础上:\n1. 将列类型 C 绑定为本地 Column<T>\n2. 将 dataSource 重命名为 data(Element Plus 使用 data 而非 dataSource)",
194
+ "typeParams": [
195
+ {
196
+ "name": "D"
197
+ },
198
+ {
199
+ "name": "T"
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "name": "useTable",
205
+ "type": "function",
206
+ "package": "@qin-ui/element-plus-pro",
207
+ "signature": "export const useTable = <\n D extends Data = Data,\n T extends Data = ExtendWithAny<D>,\n>(\n params: UseTableParams<D, T> = {}",
208
+ "description": "创建 @qin-ui/element-plus-pro 表格实例的 Hook\n基于 core useTable 封装,适配 Element Plus 的 API 风格:\n- 数据源使用 `data` 而非 `dataSource`",
209
+ "typeParams": [
210
+ {
211
+ "name": "D"
212
+ },
213
+ {
214
+ "name": "T"
215
+ }
216
+ ],
217
+ "examples": [
218
+ "```ts\ninterface User { name: string; age: number }\n\nconst table = useTable<User>({\ncolumns: [\n{ prop: 'name', title: '姓名', width: 120 },\n{ prop: 'age', title: '年龄', width: 80 },\n],\ndata: [],\npageParam: { current: 1, pageSize: 20, total: 0 },\n})\n```"
219
+ ]
220
+ }
221
+ ]
222
+ }
@@ -0,0 +1,220 @@
1
+ import { defineComponent, provide, renderSlot } from "vue";
2
+ import { g as getObject } from "../core/index-C0Pbv44C.js";
3
+ const INJECT_CONFIG = {
4
+ "pro-table": {
5
+ injectionKey: Symbol(""),
6
+ default: {
7
+ pagination: {
8
+ layout: "total, sizes, prev, pager, next, jumper",
9
+ pageSizes: [10, 20, 30, 40, 50, 100],
10
+ background: true
11
+ },
12
+ searchFormConfig: {
13
+ layout: "grid",
14
+ expand: { minExpandRows: 2, expandStatus: false }
15
+ },
16
+ control: true,
17
+ addIndexColumn: true
18
+ }
19
+ },
20
+ "pro-form": {
21
+ injectionKey: Symbol(""),
22
+ default: { grid: { gutter: 24 } }
23
+ },
24
+ "pro-form-item": {
25
+ injectionKey: Symbol(""),
26
+ default: { span: 8 }
27
+ },
28
+ input: {
29
+ injectionKey: Symbol(""),
30
+ default: { maxlength: 100, clearable: true, placeholder: "请输入" }
31
+ },
32
+ "input.textarea": {
33
+ injectionKey: Symbol(""),
34
+ default: {
35
+ maxlength: 200,
36
+ autosize: { minRows: 3, maxRows: 6 },
37
+ showWordLimit: true,
38
+ clearable: true,
39
+ placeholder: "请输入"
40
+ }
41
+ },
42
+ "input.password": {
43
+ injectionKey: Symbol(""),
44
+ default: {
45
+ showPassword: true,
46
+ maxlength: 100,
47
+ clearable: true,
48
+ placeholder: "请输入"
49
+ }
50
+ },
51
+ "input-number": {
52
+ injectionKey: Symbol(""),
53
+ default: {
54
+ max: 10 ** 15 - 1,
55
+ min: -1000000000000001,
56
+ controls: false,
57
+ placeholder: "请输入",
58
+ style: { width: "100%" }
59
+ }
60
+ },
61
+ autocomplete: {
62
+ injectionKey: Symbol(""),
63
+ default: { clearable: true, placeholder: "请输入" }
64
+ },
65
+ select: {
66
+ injectionKey: Symbol(""),
67
+ default: { clearable: true, placeholder: "请选择" }
68
+ },
69
+ cascader: {
70
+ injectionKey: Symbol(""),
71
+ default: { clearable: true, placeholder: "请选择" }
72
+ },
73
+ "date-picker": {
74
+ injectionKey: Symbol(""),
75
+ default: { style: { width: "100%" }, placeholder: "请选择" }
76
+ },
77
+ "date-picker.date": {
78
+ injectionKey: Symbol(""),
79
+ default: { style: { width: "100%" }, placeholder: "请选择" }
80
+ },
81
+ "date-picker.dates": {
82
+ injectionKey: Symbol(""),
83
+ default: { style: { width: "100%" }, placeholder: "请选择" }
84
+ },
85
+ "date-picker.daterange": {
86
+ injectionKey: Symbol(""),
87
+ default: {
88
+ style: { width: "100%" },
89
+ startPlaceholder: "开始日期",
90
+ endPlaceholder: "结束日期"
91
+ }
92
+ },
93
+ "date-picker.week": {
94
+ injectionKey: Symbol(""),
95
+ default: { style: { width: "100%" }, placeholder: "请选择" }
96
+ },
97
+ "date-picker.month": {
98
+ injectionKey: Symbol(""),
99
+ default: { style: { width: "100%" }, placeholder: "请选择" }
100
+ },
101
+ "date-picker.monthrange": {
102
+ injectionKey: Symbol(""),
103
+ default: {
104
+ style: { width: "100%" },
105
+ startPlaceholder: "开始月份",
106
+ endPlaceholder: "结束月份"
107
+ }
108
+ },
109
+ "date-picker.months": {
110
+ injectionKey: Symbol(""),
111
+ default: { style: { width: "100%" }, placeholder: "请选择" }
112
+ },
113
+ "date-picker.yearrange": {
114
+ injectionKey: Symbol(""),
115
+ default: {
116
+ style: { width: "100%" },
117
+ startPlaceholder: "开始年份",
118
+ endPlaceholder: "结束年份"
119
+ }
120
+ },
121
+ "date-picker.year": {
122
+ injectionKey: Symbol(""),
123
+ default: { style: { width: "100%" }, placeholder: "请选择" }
124
+ },
125
+ "date-picker.years": {
126
+ injectionKey: Symbol(""),
127
+ default: { style: { width: "100%" }, placeholder: "请选择" }
128
+ },
129
+ "date-picker.datetime": {
130
+ injectionKey: Symbol(""),
131
+ default: { style: { width: "100%" }, placeholder: "请选择" }
132
+ },
133
+ "date-picker.datetimerange": {
134
+ injectionKey: Symbol(""),
135
+ default: {
136
+ style: { width: "100%" },
137
+ startPlaceholder: "开始时间",
138
+ endPlaceholder: "结束时间"
139
+ }
140
+ },
141
+ "time-picker": {
142
+ injectionKey: Symbol(""),
143
+ default: { style: { width: "100%" }, placeholder: "请选择" }
144
+ },
145
+ "time-select": {
146
+ injectionKey: Symbol(""),
147
+ default: { style: { width: "100%" }, placeholder: "请选择" }
148
+ },
149
+ "checkbox-group": {
150
+ injectionKey: Symbol(""),
151
+ default: {}
152
+ },
153
+ "radio-group": {
154
+ injectionKey: Symbol(""),
155
+ default: {}
156
+ },
157
+ switch: {
158
+ injectionKey: Symbol(""),
159
+ default: { modelProp: "modelValue" }
160
+ },
161
+ slider: {
162
+ injectionKey: Symbol(""),
163
+ default: {}
164
+ },
165
+ "tree-select": {
166
+ injectionKey: Symbol(""),
167
+ default: { clearable: true, placeholder: "请选择" }
168
+ },
169
+ transfer: {
170
+ injectionKey: Symbol(""),
171
+ default: {}
172
+ }
173
+ };
174
+ const INJECT_COMPONENTS = Symbol("INJECT_COMPONENTS");
175
+ const DYNAMIC_INJECT_CONFIG = /* @__PURE__ */ Object.create(null);
176
+ const getInjectConfig = (key) => {
177
+ return INJECT_CONFIG[key] || DYNAMIC_INJECT_CONFIG[key];
178
+ };
179
+ const ensureInjectConfig = (key) => {
180
+ const existing = getInjectConfig(key);
181
+ if (existing) return existing;
182
+ const created = {
183
+ injectionKey: Symbol(`dynamic:${key}`),
184
+ default: {}
185
+ };
186
+ DYNAMIC_INJECT_CONFIG[key] = created;
187
+ return created;
188
+ };
189
+ const _sfc_main = /* @__PURE__ */ defineComponent({
190
+ ...{
191
+ name: "ProComponentProvider",
192
+ inheritAttrs: false
193
+ },
194
+ __name: "index",
195
+ props: {
196
+ componentVars: {},
197
+ componentMap: {}
198
+ },
199
+ setup(__props) {
200
+ const props = __props;
201
+ if (props.componentVars) {
202
+ Object.entries(props.componentVars).forEach(([key, val]) => {
203
+ const config = ensureInjectConfig(key);
204
+ provide(config.injectionKey, { ...config.default, ...getObject(val) });
205
+ });
206
+ }
207
+ if (props.componentMap) {
208
+ provide(INJECT_COMPONENTS, props.componentMap);
209
+ }
210
+ return (_ctx, _cache) => {
211
+ return renderSlot(_ctx.$slots, "default");
212
+ };
213
+ }
214
+ });
215
+ export {
216
+ INJECT_CONFIG as I,
217
+ _sfc_main as _,
218
+ INJECT_COMPONENTS as a,
219
+ getInjectConfig as g
220
+ };
@@ -1,220 +1,4 @@
1
- import { defineComponent, provide, renderSlot } from "vue";
2
- import { g as getObject } from "../core/index-DVXUNE-L.js";
3
- const INJECT_CONFIG = {
4
- "pro-table": {
5
- injectionKey: Symbol(""),
6
- default: {
7
- pagination: {
8
- layout: "total, sizes, prev, pager, next, jumper",
9
- pageSizes: [10, 20, 30, 40, 50, 100],
10
- background: true
11
- },
12
- searchFormConfig: {
13
- layout: "grid",
14
- expand: { minExpandRows: 2, expandStatus: false }
15
- },
16
- control: true,
17
- addIndexColumn: true
18
- }
19
- },
20
- "pro-form": {
21
- injectionKey: Symbol(""),
22
- default: { grid: { gutter: 24 } }
23
- },
24
- "pro-form-item": {
25
- injectionKey: Symbol(""),
26
- default: { span: 8 }
27
- },
28
- input: {
29
- injectionKey: Symbol(""),
30
- default: { maxlength: 100, clearable: true, placeholder: "请输入" }
31
- },
32
- "input.textarea": {
33
- injectionKey: Symbol(""),
34
- default: {
35
- maxlength: 200,
36
- autosize: { minRows: 3, maxRows: 6 },
37
- showWordLimit: true,
38
- clearable: true,
39
- placeholder: "请输入"
40
- }
41
- },
42
- "input.password": {
43
- injectionKey: Symbol(""),
44
- default: {
45
- showPassword: true,
46
- maxlength: 100,
47
- clearable: true,
48
- placeholder: "请输入"
49
- }
50
- },
51
- "input-number": {
52
- injectionKey: Symbol(""),
53
- default: {
54
- max: 10 ** 15 - 1,
55
- min: -1000000000000001,
56
- controls: false,
57
- placeholder: "请输入",
58
- style: { width: "100%" }
59
- }
60
- },
61
- autocomplete: {
62
- injectionKey: Symbol(""),
63
- default: { clearable: true, placeholder: "请输入" }
64
- },
65
- select: {
66
- injectionKey: Symbol(""),
67
- default: { clearable: true, placeholder: "请选择" }
68
- },
69
- cascader: {
70
- injectionKey: Symbol(""),
71
- default: { clearable: true, placeholder: "请选择" }
72
- },
73
- "date-picker": {
74
- injectionKey: Symbol(""),
75
- default: { style: { width: "100%" }, placeholder: "请选择" }
76
- },
77
- "date-picker.date": {
78
- injectionKey: Symbol(""),
79
- default: { style: { width: "100%" }, placeholder: "请选择" }
80
- },
81
- "date-picker.dates": {
82
- injectionKey: Symbol(""),
83
- default: { style: { width: "100%" }, placeholder: "请选择" }
84
- },
85
- "date-picker.daterange": {
86
- injectionKey: Symbol(""),
87
- default: {
88
- style: { width: "100%" },
89
- startPlaceholder: "开始日期",
90
- endPlaceholder: "结束日期"
91
- }
92
- },
93
- "date-picker.week": {
94
- injectionKey: Symbol(""),
95
- default: { style: { width: "100%" }, placeholder: "请选择" }
96
- },
97
- "date-picker.month": {
98
- injectionKey: Symbol(""),
99
- default: { style: { width: "100%" }, placeholder: "请选择" }
100
- },
101
- "date-picker.monthrange": {
102
- injectionKey: Symbol(""),
103
- default: {
104
- style: { width: "100%" },
105
- startPlaceholder: "开始月份",
106
- endPlaceholder: "结束月份"
107
- }
108
- },
109
- "date-picker.months": {
110
- injectionKey: Symbol(""),
111
- default: { style: { width: "100%" }, placeholder: "请选择" }
112
- },
113
- "date-picker.yearrange": {
114
- injectionKey: Symbol(""),
115
- default: {
116
- style: { width: "100%" },
117
- startPlaceholder: "开始年份",
118
- endPlaceholder: "结束年份"
119
- }
120
- },
121
- "date-picker.year": {
122
- injectionKey: Symbol(""),
123
- default: { style: { width: "100%" }, placeholder: "请选择" }
124
- },
125
- "date-picker.years": {
126
- injectionKey: Symbol(""),
127
- default: { style: { width: "100%" }, placeholder: "请选择" }
128
- },
129
- "date-picker.datetime": {
130
- injectionKey: Symbol(""),
131
- default: { style: { width: "100%" }, placeholder: "请选择" }
132
- },
133
- "date-picker.datetimerange": {
134
- injectionKey: Symbol(""),
135
- default: {
136
- style: { width: "100%" },
137
- startPlaceholder: "开始时间",
138
- endPlaceholder: "结束时间"
139
- }
140
- },
141
- "time-picker": {
142
- injectionKey: Symbol(""),
143
- default: { style: { width: "100%" }, placeholder: "请选择" }
144
- },
145
- "time-select": {
146
- injectionKey: Symbol(""),
147
- default: { style: { width: "100%" }, placeholder: "请选择" }
148
- },
149
- "checkbox-group": {
150
- injectionKey: Symbol(""),
151
- default: {}
152
- },
153
- "radio-group": {
154
- injectionKey: Symbol(""),
155
- default: {}
156
- },
157
- switch: {
158
- injectionKey: Symbol(""),
159
- default: { modelProp: "modelValue" }
160
- },
161
- slider: {
162
- injectionKey: Symbol(""),
163
- default: {}
164
- },
165
- "tree-select": {
166
- injectionKey: Symbol(""),
167
- default: { clearable: true, placeholder: "请选择" }
168
- },
169
- transfer: {
170
- injectionKey: Symbol(""),
171
- default: {}
172
- }
173
- };
174
- const INJECT_COMPONENTS = Symbol("INJECT_COMPONENTS");
175
- const DYNAMIC_INJECT_CONFIG = /* @__PURE__ */ Object.create(null);
176
- const getInjectConfig = (key) => {
177
- return INJECT_CONFIG[key] || DYNAMIC_INJECT_CONFIG[key];
178
- };
179
- const ensureInjectConfig = (key) => {
180
- const existing = getInjectConfig(key);
181
- if (existing) return existing;
182
- const created = {
183
- injectionKey: Symbol(`dynamic:${key}`),
184
- default: {}
185
- };
186
- DYNAMIC_INJECT_CONFIG[key] = created;
187
- return created;
188
- };
189
- const _sfc_main = /* @__PURE__ */ defineComponent({
190
- ...{
191
- inheritAttrs: false
192
- },
193
- __name: "index",
194
- props: {
195
- componentVars: {},
196
- componentMap: {}
197
- },
198
- setup(__props) {
199
- const props = __props;
200
- if (props.componentVars) {
201
- Object.entries(props.componentVars).forEach(([key, val]) => {
202
- const config = ensureInjectConfig(key);
203
- provide(config.injectionKey, { ...config.default, ...getObject(val) });
204
- });
205
- }
206
- if (props.componentMap) {
207
- provide(INJECT_COMPONENTS, props.componentMap);
208
- }
209
- return (_ctx, _cache) => {
210
- return renderSlot(_ctx.$slots, "default");
211
- };
212
- }
213
- });
1
+ import { _ } from "./index-Bmx9Q9Q-.js";
214
2
  export {
215
- INJECT_COMPONENTS,
216
- INJECT_CONFIG,
217
- _sfc_main as default,
218
- ensureInjectConfig,
219
- getInjectConfig
3
+ _ as default
220
4
  };