@qin-ui/element-plus-pro 1.2.3 → 1.2.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 +1 -1
- package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -1
- package/es/components/form/constants/index.d.ts +1 -1
- package/es/components/form/constants/index.d.ts.map +1 -1
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts +18 -0
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts.map +1 -0
- package/es/element-plus-pro.css +1 -1
- package/es/index.js +83 -104
- package/es/index.js.map +1 -1
- package/es/shared/core/index.d.ts +1 -1
- package/es/shared/core/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/form/components/BaseFormItem/index.vue +47 -66
- package/src/components/form/constants/index.ts +1 -5
- package/src/components/form/hooks/useGroupFieldAttrs.ts +119 -0
- package/src/shared/core/index.ts +0 -1
- package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts +0 -31
- package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts.map +0 -1
- package/es/components/form/components/PathProvider/index.vue.d.ts +0 -24
- package/es/components/form/components/PathProvider/index.vue.d.ts.map +0 -1
- package/src/components/form/components/GroupedFieldAttrs/index.vue +0 -115
- package/src/components/form/components/PathProvider/index.vue +0 -19
package/api.json
CHANGED
|
@@ -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":"AA0LA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAOhD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;AAuOF,wBAMG"}
|
|
@@ -58,5 +58,5 @@ export type GetComponentType<K extends ComponentName> = K extends keyof Componen
|
|
|
58
58
|
* 组件名称到 Element Plus 组件的映射
|
|
59
59
|
*/
|
|
60
60
|
export declare const componentMap: BaseComponentMap;
|
|
61
|
-
export { InjectionFormKey,
|
|
61
|
+
export { InjectionFormKey, InjectionFormSlotsKey } from '../../../shared/core';
|
|
62
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACX,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,6BAA8B,CAAC;AAE/D;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,KAAK,CAAC;IACtB,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,cAAc,EAAE,OAAO,YAAY,CAAC;IACpC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,UAAU,EAAE,OAAO,QAAQ,CAAC;CAC7B,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,YAAY;CAAG;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,gBAAgB,GACtB,MAAM,YAAY,GAClB,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,IAClD,CAAC,SAAS,MAAM,YAAY,GACxB,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,MAAM,gBAAgB,GAC9B,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;AAEd;;GAEG;AAEH,eAAO,MAAM,YAAY,EAAE,gBAe1B,CAAA;AAGD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACX,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,6BAA8B,CAAC;AAE/D;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,KAAK,CAAC;IACtB,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,cAAc,EAAE,OAAO,YAAY,CAAC;IACpC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,UAAU,EAAE,OAAO,QAAQ,CAAC;CAC7B,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,YAAY;CAAG;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,gBAAgB,GACtB,MAAM,YAAY,GAClB,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,IAClD,CAAC,SAAS,MAAM,YAAY,GACxB,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,MAAM,gBAAgB,GAC9B,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;AAEd;;GAEG;AAEH,eAAO,MAAM,YAAY,EAAE,gBAe1B,CAAA;AAGD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { FormItemProps, GridItemProps } from '../../../shared/ui';
|
|
3
|
+
import { FORM_ITEM_SLOT_KEYS } from '../constants';
|
|
4
|
+
import { Base, Field } from '../types';
|
|
5
|
+
export interface GroupedField {
|
|
6
|
+
path: string;
|
|
7
|
+
gridItemProps: GridItemProps;
|
|
8
|
+
formItemProps: FormItemProps;
|
|
9
|
+
formItemSlots: Record<(typeof FORM_ITEM_SLOT_KEYS)[number], any>;
|
|
10
|
+
componentProps: Record<string, any>;
|
|
11
|
+
container?: Base['formItemContainer'];
|
|
12
|
+
rawField: Field;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 将 fields 配置数组逐个拆分为 grid / formItem / component / slots 分组。
|
|
16
|
+
*/
|
|
17
|
+
export declare function useGroupFieldAttrs(validFields: ComputedRef<Field[]>): ComputedRef<GroupedField[]>;
|
|
18
|
+
//# sourceMappingURL=useGroupFieldAttrs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGroupFieldAttrs.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useGroupFieldAttrs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAC9E,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAK5C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IACjE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,+BA0FnE"}
|
package/es/element-plus-pro.css
CHANGED
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./element-plus-pro.css";
|
|
2
|
-
import { inject, computed, provide, toValue,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { inject, computed, provide, toValue, mergeProps, defineComponent, resolveComponent, createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList, createVNode, createSlots, ref, useAttrs, createCommentVNode, resolveDynamicComponent, renderSlot, normalizeProps, isVNode, createTextVNode, toDisplayString, useSlots, reactive, withModifiers, createElementVNode, onBeforeUnmount, watch, watchEffect, withKeys, normalizeStyle, nextTick, useModel, onMounted, mergeModels, resolveDirective, normalizeClass, withDirectives, guardReactiveProps } from "vue";
|
|
3
|
+
import { ElTable, ElPagination, useFormDisabled, ElCol, ElFormItem, ElTransfer, ElTreeSelect, ElSlider, ElSwitch, ElRadioGroup, ElCheckboxGroup, ElTimeSelect, ElTimePicker, ElDatePicker, ElCascader, ElSelect, ElAutocomplete, ElInputNumber, ElInput, ElRow, useLocale as useLocale$1, ElForm, ElSpace, ElButton, ElDropdown, ElDropdownMenu, ElDropdownItem, ElCheckbox, ElTableColumn } from "element-plus";
|
|
4
|
+
import { isPlainObject, getObject, toPath, useForm as useForm$1, zhCN as zhCN$1, zhTW as zhTW$1, enUS as enUS$1, resolveLocaleName, format, omit, InjectionFormSlotsKey, cloneDeep, InjectionFormKey, camelizeProperties, useFields as useFields$1, useFormRef as useFormRef$1, get, pick, useTable as useTable$1 } from "@qin-ui/pro-components-core";
|
|
5
5
|
import { useFormData } from "@qin-ui/pro-components-core";
|
|
6
6
|
const tableProps = () => ElTable.props || {};
|
|
7
7
|
const paginationProps = () => ElPagination.props || {};
|
|
@@ -205,40 +205,19 @@ const componentMap = {
|
|
|
205
205
|
"tree-select": ElTreeSelect,
|
|
206
206
|
"transfer": ElTransfer
|
|
207
207
|
};
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
const namePath = computed(() => {
|
|
216
|
-
return Array.isArray(props.path) ? props.path.join(".") : props.path;
|
|
217
|
-
});
|
|
218
|
-
provide(InjectionPathKey, namePath);
|
|
219
|
-
return (_ctx, _cache) => {
|
|
220
|
-
return renderSlot(_ctx.$slots, "default", { path: namePath.value });
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
225
|
-
__name: "index",
|
|
226
|
-
props: {
|
|
227
|
-
field: {}
|
|
228
|
-
},
|
|
229
|
-
setup(__props) {
|
|
230
|
-
const formItemPropKeys = Object.keys(formItemProps());
|
|
231
|
-
const gridItemPropKeys = Object.keys(gridItemProps());
|
|
232
|
-
const props = __props;
|
|
233
|
-
const config = INJECT_CONFIG["pro-form-item"];
|
|
234
|
-
const injectFormItemProps = inject(config.injectionKey, config.default);
|
|
235
|
-
const groupedAttributes = computed(() => {
|
|
208
|
+
const formItemPropKeys = Object.keys(formItemProps());
|
|
209
|
+
const gridItemPropKeys = Object.keys(gridItemProps());
|
|
210
|
+
function useGroupFieldAttrs(validFields) {
|
|
211
|
+
const config = INJECT_CONFIG["pro-form-item"];
|
|
212
|
+
const injectFormItemProps = inject(config.injectionKey, config.default);
|
|
213
|
+
return computed(() => {
|
|
214
|
+
return validFields.value.map((field) => {
|
|
236
215
|
let gridItemProps2 = {};
|
|
237
216
|
let formItemProps2 = {};
|
|
238
217
|
const componentProps = { slots: {} };
|
|
239
218
|
const formItemSlots = {};
|
|
240
|
-
if (isPlainObject(
|
|
241
|
-
const { path, name, fields, formItemClass, formItemStyle, formItemContainer, hidden, span, getFormItemRef, getComponentRef, getFormItemComputedProps, getComponentComputedProps, slots = {}, formItemDataAttrs = {}, componentDataAttrs = {}, extraProps, ...rest } =
|
|
219
|
+
if (isPlainObject(field)) {
|
|
220
|
+
const { path, name, fields, formItemClass, formItemStyle, formItemContainer, hidden, span, getFormItemRef, getComponentRef, getFormItemComputedProps, getComponentComputedProps, slots = {}, formItemDataAttrs = {}, componentDataAttrs = {}, extraProps, ...rest } = field;
|
|
242
221
|
const {
|
|
243
222
|
class: injectClassName,
|
|
244
223
|
style: injectStyle,
|
|
@@ -259,7 +238,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
259
238
|
{ class: toValue(formItemClass), style: toValue(formItemStyle) },
|
|
260
239
|
formItemDataAttrs
|
|
261
240
|
);
|
|
262
|
-
|
|
241
|
+
const container = formItemContainer ?? injectFormItemContainer;
|
|
263
242
|
Object.keys(rest).forEach((k) => {
|
|
264
243
|
if (gridItemPropKeys.includes(k)) {
|
|
265
244
|
gridItemProps2[k] = rest[k];
|
|
@@ -274,17 +253,32 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
274
253
|
if (FORM_ITEM_SLOT_KEYS.includes(k)) {
|
|
275
254
|
formItemSlots[k] = slots[k];
|
|
276
255
|
} else {
|
|
277
|
-
componentProps
|
|
256
|
+
componentProps.slots[k] = slots[k];
|
|
278
257
|
}
|
|
279
258
|
});
|
|
259
|
+
const raw2 = toValue(path) ?? toValue(name);
|
|
260
|
+
return {
|
|
261
|
+
path: Array.isArray(raw2) ? raw2.join(".") : raw2 || "",
|
|
262
|
+
gridItemProps: gridItemProps2,
|
|
263
|
+
formItemProps: formItemProps2,
|
|
264
|
+
formItemSlots,
|
|
265
|
+
componentProps,
|
|
266
|
+
container,
|
|
267
|
+
rawField: field
|
|
268
|
+
};
|
|
280
269
|
}
|
|
281
|
-
|
|
270
|
+
const raw = toValue(field == null ? void 0 : field.path) ?? toValue(field == null ? void 0 : field.name);
|
|
271
|
+
return {
|
|
272
|
+
path: Array.isArray(raw) ? raw.join(".") : raw || "",
|
|
273
|
+
gridItemProps: gridItemProps2,
|
|
274
|
+
formItemProps: formItemProps2,
|
|
275
|
+
formItemSlots,
|
|
276
|
+
componentProps,
|
|
277
|
+
rawField: field
|
|
278
|
+
};
|
|
282
279
|
});
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
288
282
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
289
283
|
...{ name: "BaseFormItem", inheritAttrs: false },
|
|
290
284
|
__name: "index",
|
|
@@ -330,81 +324,66 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
330
324
|
}
|
|
331
325
|
});
|
|
332
326
|
};
|
|
327
|
+
const groupedFields = useGroupFieldAttrs(validFields);
|
|
333
328
|
return (_ctx, _cache) => {
|
|
334
329
|
const _component_BaseFormItem = resolveComponent("BaseFormItem");
|
|
335
330
|
return openBlock(), createBlock(unref(_sfc_main$d), mergeProps({
|
|
336
331
|
component: enableGrid.value ? unref(ElRow) : void 0
|
|
337
332
|
}, computedGridProps.value, { style: { "width": "100%" } }), {
|
|
338
333
|
default: withCtx(() => [
|
|
339
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
340
|
-
return openBlock(), createBlock(_sfc_main$
|
|
341
|
-
key:
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
334
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(groupedFields), (item, index2) => {
|
|
335
|
+
return openBlock(), createBlock(unref(_sfc_main$d), mergeProps({
|
|
336
|
+
key: item.path || index2,
|
|
337
|
+
component: enableGrid.value ? unref(ElCol) : void 0
|
|
338
|
+
}, { ref_for: true }, item.gridItemProps), {
|
|
339
|
+
default: withCtx(() => [
|
|
340
|
+
createVNode(unref(_sfc_main$d), {
|
|
341
|
+
component: item.container,
|
|
342
|
+
path: item.path
|
|
343
|
+
}, {
|
|
344
|
+
default: withCtx(() => [
|
|
345
|
+
createVNode(unref(ElFormItem), mergeProps({ ref_for: true }, item.formItemProps, {
|
|
346
|
+
ref_for: true,
|
|
347
|
+
ref: (el) => formItemRefs[index2] = el,
|
|
348
|
+
prop: unref(toPath)(item.path).join("."),
|
|
349
|
+
path: item.path,
|
|
350
|
+
onVnodeMounted: ($event) => onFormItemMounted(index2, item.formItemProps)
|
|
351
|
+
}), createSlots({
|
|
354
352
|
default: withCtx(() => [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
field.fields ? (openBlock(), createBlock(_component_BaseFormItem, {
|
|
369
|
-
key: 0,
|
|
370
|
-
grid: field.grid ?? __props.grid,
|
|
371
|
-
fields: field.fields,
|
|
372
|
-
disabled: toValue(field.disabled)
|
|
373
|
-
}, null, 8, ["grid", "fields", "disabled"])) : (openBlock(), createBlock(unref(_sfc_main$e), mergeProps({
|
|
374
|
-
key: 1,
|
|
375
|
-
ref_for: true,
|
|
376
|
-
ref: (el) => componentRefs[index2] = el
|
|
377
|
-
}, { ref_for: true }, componentProps, {
|
|
378
|
-
path,
|
|
379
|
-
onVnodeMounted: ($event) => onComponentMounted(index2)
|
|
380
|
-
}), null, 16, ["path", "onVnodeMounted"]))
|
|
381
|
-
]),
|
|
382
|
-
_: 2
|
|
383
|
-
}, [
|
|
384
|
-
renderList(formItemSlots, (slot, name) => {
|
|
385
|
-
return {
|
|
386
|
-
name,
|
|
387
|
-
fn: withCtx((scoped) => [
|
|
388
|
-
createVNode(unref(_sfc_main$c), mergeProps({
|
|
389
|
-
path,
|
|
390
|
-
component: slot
|
|
391
|
-
}, { ref_for: true }, scoped), null, 16, ["path", "component"])
|
|
392
|
-
])
|
|
393
|
-
};
|
|
394
|
-
})
|
|
395
|
-
]), 1040, ["prop", "path", "onVnodeMounted"])
|
|
396
|
-
]),
|
|
397
|
-
_: 2
|
|
398
|
-
}, 1032, ["component", "path"])
|
|
353
|
+
item.rawField.fields ? (openBlock(), createBlock(_component_BaseFormItem, {
|
|
354
|
+
key: 0,
|
|
355
|
+
grid: item.rawField.grid ?? __props.grid,
|
|
356
|
+
fields: item.rawField.fields,
|
|
357
|
+
disabled: toValue(item.rawField.disabled)
|
|
358
|
+
}, null, 8, ["grid", "fields", "disabled"])) : (openBlock(), createBlock(unref(_sfc_main$e), mergeProps({
|
|
359
|
+
key: 1,
|
|
360
|
+
ref_for: true,
|
|
361
|
+
ref: (el) => componentRefs[index2] = el
|
|
362
|
+
}, { ref_for: true }, item.componentProps, {
|
|
363
|
+
path: item.path,
|
|
364
|
+
onVnodeMounted: ($event) => onComponentMounted(index2)
|
|
365
|
+
}), null, 16, ["path", "onVnodeMounted"]))
|
|
399
366
|
]),
|
|
400
367
|
_: 2
|
|
401
|
-
},
|
|
368
|
+
}, [
|
|
369
|
+
renderList(item.formItemSlots, (slot, name) => {
|
|
370
|
+
return {
|
|
371
|
+
name,
|
|
372
|
+
fn: withCtx((scoped) => [
|
|
373
|
+
createVNode(unref(_sfc_main$c), mergeProps({
|
|
374
|
+
path: item.path,
|
|
375
|
+
component: slot
|
|
376
|
+
}, { ref_for: true }, scoped), null, 16, ["path", "component"])
|
|
377
|
+
])
|
|
378
|
+
};
|
|
379
|
+
})
|
|
380
|
+
]), 1040, ["prop", "path", "onVnodeMounted"])
|
|
402
381
|
]),
|
|
403
382
|
_: 2
|
|
404
|
-
}, 1032, ["
|
|
383
|
+
}, 1032, ["component", "path"])
|
|
405
384
|
]),
|
|
406
385
|
_: 2
|
|
407
|
-
}, 1040);
|
|
386
|
+
}, 1040, ["component"]);
|
|
408
387
|
}), 128))
|
|
409
388
|
]),
|
|
410
389
|
_: 1
|
|
@@ -419,7 +398,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
419
398
|
}
|
|
420
399
|
return target;
|
|
421
400
|
};
|
|
422
|
-
const BaseFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
401
|
+
const BaseFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-295cd434"]]);
|
|
423
402
|
function useForm(...args) {
|
|
424
403
|
return useForm$1(...args);
|
|
425
404
|
}
|