@dazhicheng/ui 1.5.199 → 1.5.202
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/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api/dataTypeContext.js +17 -0
- package/dist/assets/img/empty_images/no_data.png.js +4 -0
- package/dist/assets/img/empty_images/search.png.js +4 -0
- package/dist/assets/img/image_status/develop.png.js +4 -0
- package/dist/assets/img/image_status/loading.gif.js +4 -0
- package/dist/assets/img/image_status/loading_fail.png.js +4 -0
- package/dist/assets/img/image_status/no_network.png.js +4 -0
- package/dist/assets/img/image_status/no_permission.png.js +4 -0
- package/dist/assets/svg/RiRefreshLine.svg.js +4 -0
- package/dist/assets/svg/action_more.svg.js +4 -0
- package/dist/assets/svg/add.svg.js +4 -0
- package/dist/assets/svg/addCircleLine.svg.js +4 -0
- package/dist/assets/svg/arrowDown.svg.js +4 -0
- package/dist/assets/svg/arrowLineDown.svg.js +5 -0
- package/dist/assets/svg/arrowSUp.svg.js +4 -0
- package/dist/assets/svg/arrowUp.svg.js +4 -0
- package/dist/assets/svg/close.svg.js +4 -0
- package/dist/assets/svg/columnSet.svg.js +4 -0
- package/dist/assets/svg/determinateCircleLine.svg.js +5 -0
- package/dist/assets/svg/drag.svg.js +5 -0
- package/dist/assets/svg/exportSvg.svg.js +4 -0
- package/dist/assets/svg/fileSvg.svg.js +4 -0
- package/dist/assets/svg/help.svg.js +4 -0
- package/dist/assets/svg/item_error.svg.js +4 -0
- package/dist/assets/svg/paixu-jiangxu.svg.js +4 -0
- package/dist/assets/svg/paixu-moren.svg.js +4 -0
- package/dist/assets/svg/paixu-shengxu.svg.js +4 -0
- package/dist/assets/svg/quanping.svg.js +4 -0
- package/dist/assets/svg/suoxiao.svg.js +4 -0
- package/dist/components/tt-api-component/index.js +7 -0
- package/dist/components/tt-api-component/index.vue.js +7 -0
- package/dist/components/tt-api-component/index.vue2.js +199 -0
- package/dist/components/tt-area/TtArea.vue.js +7 -0
- package/dist/components/tt-area/TtArea.vue3.js +36 -0
- package/dist/components/tt-button/components/AddButton.vue.js +24 -0
- package/dist/components/tt-button/components/AddButton.vue2.js +4 -0
- package/dist/components/tt-button/index.js +9 -0
- package/dist/components/tt-button/index.vue.js +7 -0
- package/dist/components/tt-button/index.vue2.js +68 -0
- package/dist/components/tt-checkbox/index.js +7 -0
- package/dist/components/tt-checkbox/index.vue.js +77 -0
- package/dist/components/tt-checkbox/index.vue2.js +4 -0
- package/dist/components/tt-drawer/index.js +14 -0
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +157 -0
- package/dist/components/tt-drawer/src/RenderDrawer.vue3.js +5 -0
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +56 -0
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue3.js +5 -0
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +7 -0
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +21 -0
- package/dist/components/tt-drawer/src/hooks/useDrawerRender.js +124 -0
- package/dist/components/tt-drawer/src/hooks/useResizable.js +98 -0
- package/dist/components/tt-drawer/src/index.js +17 -0
- package/dist/components/tt-drawer/src/props.js +72 -0
- package/dist/components/tt-drawer/src/utils/drawer-api.js +191 -0
- package/dist/components/tt-empty/index.js +34 -0
- package/dist/components/tt-form/index.js +59 -0
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +38 -0
- package/dist/components/tt-form/src/components/ExpandableArrow.vue3.js +5 -0
- package/dist/components/tt-form/src/components/FormActions.vue2.js +177 -0
- package/dist/components/tt-form/src/components/FormActions.vue3.js +5 -0
- package/dist/components/tt-form/src/components/FormElInput.vue.js +80 -0
- package/dist/components/tt-form/src/components/FormElInput.vue2.js +4 -0
- package/dist/components/tt-form/src/components/Slot.js +28 -0
- package/dist/components/tt-form/src/config.js +57 -0
- package/dist/components/tt-form/src/form/FormControl.vue.js +16 -0
- package/dist/components/tt-form/src/form/FormControl.vue2.js +4 -0
- package/dist/components/tt-form/src/form/FormDescription.vue.js +21 -0
- package/dist/components/tt-form/src/form/FormDescription.vue2.js +4 -0
- package/dist/components/tt-form/src/form/FormItem.vue.js +20 -0
- package/dist/components/tt-form/src/form/FormItem.vue2.js +4 -0
- package/dist/components/tt-form/src/form/FormLabel.vue.js +19 -0
- package/dist/components/tt-form/src/form/FormLabel.vue2.js +4 -0
- package/dist/components/tt-form/src/form/FormMessage.vue.js +18 -0
- package/dist/components/tt-form/src/form/FormMessage.vue2.js +4 -0
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +30 -0
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue2.js +4 -0
- package/dist/components/tt-form/src/form/RenderContent.vue.js +31 -0
- package/dist/components/tt-form/src/form/RenderContent.vue2.js +4 -0
- package/dist/components/tt-form/src/form/injectionKeys.js +4 -0
- package/dist/components/tt-form/src/form/useFormField.js +24 -0
- package/dist/components/tt-form/src/form-render/FormField.vue.js +4 -0
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +345 -0
- package/dist/components/tt-form/src/form-render/FormFieldContact.js +54 -0
- package/dist/components/tt-form/src/form-render/FormLabel.vue.js +4 -0
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +101 -0
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +195 -0
- package/dist/components/tt-form/src/form-render/array-register/props.js +47 -0
- package/dist/components/tt-form/src/form-render/array-register/utils.js +12 -0
- package/dist/components/tt-form/src/form-render/context.js +15 -0
- package/dist/components/tt-form/src/form-render/dependencies.js +51 -0
- package/dist/components/tt-form/src/form-render/expandable.js +46 -0
- package/dist/components/tt-form/src/form-render/form.vue2.js +196 -0
- package/dist/components/tt-form/src/form-render/form.vue3.js +5 -0
- package/dist/components/tt-form/src/form-render/helper.js +22 -0
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +10 -0
- package/dist/components/tt-form/src/formApi.js +790 -0
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +223 -0
- package/dist/components/tt-form/src/group-form/GroupForm.vue3.js +5 -0
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +277 -0
- package/dist/components/tt-form/src/group-form/GroupSection.vue3.js +5 -0
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +153 -0
- package/dist/components/tt-form/src/group-form/LazyFormField.vue3.js +5 -0
- package/dist/components/tt-form/src/group-form/groupFormApi.js +700 -0
- package/dist/components/tt-form/src/group-form/lazyContext.js +38 -0
- package/dist/components/tt-form/src/group-form/useGroupForm.js +83 -0
- package/dist/components/tt-form/src/group-form/utils.js +106 -0
- package/dist/components/tt-form/src/hooks/useArrayRegistry.js +22 -0
- package/dist/components/tt-form/src/hooks/useFieldArray.js +137 -0
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +33 -0
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +81 -0
- package/dist/components/tt-form/src/index.vue2.js +147 -0
- package/dist/components/tt-form/src/index.vue3.js +5 -0
- package/dist/components/tt-form/src/shared/createContext.js +14 -0
- package/dist/components/tt-form/src/shared/global-state.js +22 -0
- package/dist/components/tt-form/src/shared/zod-defaults.js +47 -0
- package/dist/components/tt-form/src/types/forms.js +6 -0
- package/dist/components/tt-form/src/useForm.js +28 -0
- package/dist/components/tt-form/src/useFormContext.js +320 -0
- package/dist/components/tt-form/src/utils/array-path.js +18 -0
- package/dist/components/tt-form-item-error-tooltip/index.js +9 -0
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +183 -0
- package/dist/components/tt-form-item-error-tooltip/index.vue3.js +5 -0
- package/dist/components/tt-icon/components/AddIcon.vue.js +28 -0
- package/dist/components/tt-icon/components/AddIcon.vue2.js +4 -0
- package/dist/components/tt-icon/components/SubIcon.vue.js +28 -0
- package/dist/components/tt-icon/components/SubIcon.vue2.js +4 -0
- package/dist/components/tt-icon/index.js +11 -0
- package/dist/components/tt-icon/index.vue.js +8 -0
- package/dist/components/tt-icon/index.vue2.js +115 -0
- package/dist/components/tt-image/index.js +9 -0
- package/dist/components/tt-image/src/components/ImageViewer.js +41 -0
- package/dist/components/tt-image/tt-image.js +55 -0
- package/dist/components/tt-loading/index.js +8 -0
- package/dist/components/tt-loading/src/directive.js +51 -0
- package/dist/components/tt-loading/src/loading.vue.js +7 -0
- package/dist/components/tt-loading/src/loading.vue2.js +75 -0
- package/dist/components/tt-loading/src/service.js +79 -0
- package/dist/components/tt-log/index.js +7 -0
- package/dist/components/tt-log/index.vue.js +31 -0
- package/dist/components/tt-log/index.vue2.js +4 -0
- package/dist/components/tt-modal/index.js +14 -0
- package/dist/components/tt-modal/src/RenderModal.vue.js +310 -0
- package/dist/components/tt-modal/src/RenderModal.vue3.js +5 -0
- package/dist/components/tt-modal/src/components/ModalFooter.vue.js +7 -0
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +74 -0
- package/dist/components/tt-modal/src/components/ModalHeader.vue.js +7 -0
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +22 -0
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +48 -0
- package/dist/components/tt-modal/src/components/ModalWrapper.vue2.js +4 -0
- package/dist/components/tt-modal/src/hooks/useModalRender.js +131 -0
- package/dist/components/tt-modal/src/index.js +17 -0
- package/dist/components/tt-modal/src/props.js +75 -0
- package/dist/components/tt-modal/src/utils/modal-api.js +200 -0
- package/dist/components/tt-modal/src/utils/modal-stack.js +28 -0
- package/dist/components/tt-modal-form/hooks/useModalFormSlot.js +22 -0
- package/dist/components/tt-modal-form/index.vue.js +201 -0
- package/dist/components/tt-modal-form/index.vue2.js +4 -0
- package/dist/components/tt-modal-form/useModalForm.js +30 -0
- package/dist/components/tt-nav-anchor/index.js +8 -0
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +234 -0
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue3.js +5 -0
- package/dist/components/tt-nav-anchor/src/constants.js +4 -0
- package/dist/components/tt-panel-select/index.js +7 -0
- package/dist/components/tt-panel-select/src/common.js +4 -0
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +56 -0
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue2.js +4 -0
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +277 -0
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue2.js +4 -0
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +108 -0
- package/dist/components/tt-panel-select/src/components/PanelRight.vue2.js +4 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +184 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.js +91 -0
- package/dist/components/tt-panel-select/src/index.vue.js +386 -0
- package/dist/components/tt-panel-select/src/index.vue2.js +4 -0
- package/dist/components/tt-select/index.js +8 -0
- package/dist/components/tt-select/src/Select.vue.js +315 -0
- package/dist/components/tt-select/src/Select.vue3.js +5 -0
- package/dist/components/tt-select/src/components/SelectTable.vue.js +86 -0
- package/dist/components/tt-select/src/components/SelectTable.vue3.js +5 -0
- package/dist/components/tt-select/src/components/Table.vue.js +307 -0
- package/dist/components/tt-select/src/components/Table.vue3.js +5 -0
- package/dist/components/tt-select/src/const.js +19 -0
- package/dist/components/tt-select/src/hooks/useDataSource.js +196 -0
- package/dist/components/tt-select/src/hooks/useGrid.js +97 -0
- package/dist/components/tt-select/src/hooks/useKeyboard.js +63 -0
- package/dist/components/tt-select/src/hooks/usePagination.js +45 -0
- package/dist/components/tt-select/src/hooks/useSelect.js +100 -0
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +345 -0
- package/dist/components/tt-select/src/props.js +201 -0
- package/dist/components/tt-select/src/utils/index.js +16 -0
- package/dist/components/tt-table/index.js +63 -0
- package/dist/components/tt-table/src/Table.vue.js +623 -0
- package/dist/components/tt-table/src/Table.vue3.js +5 -0
- package/dist/components/tt-table/src/TableForm.vue.js +356 -0
- package/dist/components/tt-table/src/TableForm.vue2.js +4 -0
- package/dist/components/tt-table/src/componentMap.js +4 -0
- package/dist/components/tt-table/src/components/RowContext.js +24 -0
- package/dist/components/tt-table/src/components/TableAction.vue.js +222 -0
- package/dist/components/tt-table/src/components/TableAction.vue2.js +4 -0
- package/dist/components/tt-table/src/components/TableButtons.js +117 -0
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +234 -0
- package/dist/components/tt-table/src/components/TableColumnModal.vue3.js +5 -0
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +87 -0
- package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +4 -0
- package/dist/components/tt-table/src/emits.js +15 -0
- package/dist/components/tt-table/src/hooks/useCellArea.js +15 -0
- package/dist/components/tt-table/src/hooks/useColumns.js +275 -0
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +53 -0
- package/dist/components/tt-table/src/hooks/useDataSource.js +224 -0
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +64 -0
- package/dist/components/tt-table/src/hooks/usePagination.js +44 -0
- package/dist/components/tt-table/src/hooks/useRowSelection.js +84 -0
- package/dist/components/tt-table/src/hooks/useTableContext.js +20 -0
- package/dist/components/tt-table/src/hooks/useTableEvent.js +197 -0
- package/dist/components/tt-table/src/hooks/useTableForm.js +60 -0
- package/dist/components/tt-table/src/hooks/useTableRender.js +33 -0
- package/dist/components/tt-table/src/hooks/useTableSlot.js +17 -0
- package/dist/components/tt-table/src/props.js +482 -0
- package/dist/components/tt-table/src/toolProps.js +30 -0
- package/dist/components/tt-table/src/utils/context.js +17 -0
- package/dist/components/tt-table/src/utils/table-api.js +386 -0
- package/dist/components/tt-table/src/utils/table-form-api.js +122 -0
- package/dist/components/tt-text/index.js +7 -0
- package/dist/components/tt-text/index.vue.js +7 -0
- package/dist/components/tt-text/index.vue2.js +73 -0
- package/dist/components/tt-upload/index.js +9 -0
- package/dist/components/tt-upload/src/TtUpload.vue.js +306 -0
- package/dist/components/tt-upload/src/TtUpload.vue2.js +4 -0
- package/dist/components/tt-upload/src/typing.js +107 -0
- package/dist/directives/auto-tip/index.js +62 -0
- package/dist/directives/dialog-resize/index.js +49 -0
- package/dist/directives/dialog-resize/use-css-variable.js +44 -0
- package/dist/directives/dialog-resize/use-draggable.js +35 -0
- package/dist/directives/dialog-resize/use-fullscreen.js +38 -0
- package/dist/directives/dialog-resize/use-parse-translate.js +9 -0
- package/dist/directives/dialog-resize/use-resizer.js +37 -0
- package/dist/directives/disabled-tip/index.js +78 -0
- package/dist/directives/index.js +8 -0
- package/dist/hooks/useDataPermissionOptions.js +142 -0
- package/dist/hooks/useFormSchemasLink.js +261 -0
- package/dist/hooks/useFormat.js +44 -0
- package/dist/hooks/useLoading.js +22 -0
- package/dist/hooks/useScreenshotOss.js +69 -0
- package/dist/hooks/useSetup.js +59 -0
- package/dist/hooks/useTable.js +13 -0
- package/dist/hooks/useTemplateSlot.js +13 -0
- package/dist/index.js +142 -60274
- package/dist/plugins/default/renderCellContent.js +58 -0
- package/dist/plugins/vxeTable/switchStatus.js +91 -0
- package/dist/plugins.js +4 -146
- package/dist/style.css +1 -1
- package/dist/utils/xhr.js +8 -0
- package/package.json +5 -3
- package/dist/index-NG5FNCLD.js +0 -3430
- package/dist/index.modern-4Cf3dcJP.js +0 -3069
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent as o, createBlock as t, openBlock as r, unref as n, withCtx as l, renderSlot as a } from "vue";
|
|
2
|
+
import { Slot as f } from "../components/Slot.js";
|
|
3
|
+
const c = /* @__PURE__ */ o({
|
|
4
|
+
__name: "FormControl",
|
|
5
|
+
setup(m) {
|
|
6
|
+
return (e, p) => (r(), t(n(f), null, {
|
|
7
|
+
default: l(() => [
|
|
8
|
+
a(e.$slots, "default")
|
|
9
|
+
]),
|
|
10
|
+
_: 3
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
c as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as n, createElementBlock as p, openBlock as m, normalizeClass as c, unref as e, renderSlot as i } from "vue";
|
|
2
|
+
import { clnm as l } from "@dazhicheng/utils";
|
|
3
|
+
import { useFormField as a } from "./useFormField.js";
|
|
4
|
+
const d = ["id"], x = /* @__PURE__ */ n({
|
|
5
|
+
__name: "FormDescription",
|
|
6
|
+
props: {
|
|
7
|
+
class: {}
|
|
8
|
+
},
|
|
9
|
+
setup(o) {
|
|
10
|
+
const t = o, { formDescriptionId: r } = a();
|
|
11
|
+
return (s, f) => (m(), p("span", {
|
|
12
|
+
id: e(r),
|
|
13
|
+
class: c(e(l)("text-muted-foreground text-12px h-18px line-height-18px empty:h-0", t.class))
|
|
14
|
+
}, [
|
|
15
|
+
i(s.$slots, "default")
|
|
16
|
+
], 10, d));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
x as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as t, useId as n, provide as m, createElementBlock as c, openBlock as l, normalizeClass as a, unref as p, renderSlot as i } from "vue";
|
|
2
|
+
import { clnm as d } from "@dazhicheng/utils";
|
|
3
|
+
import { FORM_ITEM_INJECTION_KEY as f } from "./injectionKeys.js";
|
|
4
|
+
const C = /* @__PURE__ */ t({
|
|
5
|
+
__name: "FormItem",
|
|
6
|
+
props: {
|
|
7
|
+
class: {}
|
|
8
|
+
},
|
|
9
|
+
setup(e) {
|
|
10
|
+
const o = e, r = n();
|
|
11
|
+
return m(f, r), (s, _) => (l(), c("div", {
|
|
12
|
+
class: a(p(d)(o.class))
|
|
13
|
+
}, [
|
|
14
|
+
i(s.$slots, "default")
|
|
15
|
+
], 2));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
C as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as s, createElementBlock as l, openBlock as n, normalizeClass as t, unref as a, renderSlot as c } from "vue";
|
|
2
|
+
import { clnm as m } from "@dazhicheng/utils";
|
|
3
|
+
const i = /* @__PURE__ */ s({
|
|
4
|
+
__name: "FormLabel",
|
|
5
|
+
props: {
|
|
6
|
+
class: {}
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
const o = e;
|
|
10
|
+
return (r, p) => (n(), l("label", {
|
|
11
|
+
class: t(a(m)(o.class))
|
|
12
|
+
}, [
|
|
13
|
+
c(r.$slots, "default")
|
|
14
|
+
], 2));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
i as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent as t, createBlock as s, openBlock as a, unref as e, toValue as m } from "vue";
|
|
2
|
+
import { ErrorMessage as n } from "vee-validate";
|
|
3
|
+
import { useFormField as c } from "./useFormField.js";
|
|
4
|
+
const d = /* @__PURE__ */ t({
|
|
5
|
+
__name: "FormMessage",
|
|
6
|
+
setup(p) {
|
|
7
|
+
const { formMessageId: r, name: o } = c();
|
|
8
|
+
return (i, u) => (a(), s(e(n), {
|
|
9
|
+
id: e(r),
|
|
10
|
+
name: m(e(o)),
|
|
11
|
+
as: "p",
|
|
12
|
+
class: "text-[12px] text-destructive"
|
|
13
|
+
}, null, 8, ["id", "name"]));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
d as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as n, createBlock as f, openBlock as s, unref as e, toValue as o, withCtx as i, createVNode as p } from "vue";
|
|
2
|
+
import { TtFormItemErrorTooltip as l } from "../../../tt-form-item-error-tooltip/index.js";
|
|
3
|
+
import { ErrorMessage as d } from "vee-validate";
|
|
4
|
+
import { useFormField as c } from "./useFormField.js";
|
|
5
|
+
const M = /* @__PURE__ */ n({
|
|
6
|
+
__name: "FormMessageToolTip",
|
|
7
|
+
props: {
|
|
8
|
+
refDom: {}
|
|
9
|
+
},
|
|
10
|
+
setup(u) {
|
|
11
|
+
const { formMessageId: m, name: r, error: t } = c();
|
|
12
|
+
return (a, _) => (s(), f(e(d), {
|
|
13
|
+
id: e(m),
|
|
14
|
+
name: o(e(r))
|
|
15
|
+
}, {
|
|
16
|
+
default: i(() => [
|
|
17
|
+
p(e(l), {
|
|
18
|
+
"ref-dom": a.refDom,
|
|
19
|
+
"err-msg": e(t),
|
|
20
|
+
"field-name": o(e(r)),
|
|
21
|
+
placement: "right"
|
|
22
|
+
}, null, 8, ["ref-dom", "err-msg", "field-name"])
|
|
23
|
+
]),
|
|
24
|
+
_: 1
|
|
25
|
+
}, 8, ["id", "name"]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
M as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isObject as c, isFunction as e } from "@dazhicheng/utils";
|
|
2
|
+
import { defineComponent as m, h as u } from "vue";
|
|
3
|
+
import { useFormValues as f } from "vee-validate";
|
|
4
|
+
import { injectRenderFormProps as s } from "../form-render/context.js";
|
|
5
|
+
const j = m({
|
|
6
|
+
name: "RenderContent",
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
props: {
|
|
9
|
+
/**
|
|
10
|
+
* The content to render.
|
|
11
|
+
*/
|
|
12
|
+
content: {
|
|
13
|
+
default: void 0,
|
|
14
|
+
type: [Object, String, Function]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(n, { attrs: t, slots: o }) {
|
|
18
|
+
const r = f(), i = s().form;
|
|
19
|
+
return () => n.content ? (c(n.content) || e(n.content)) && n.content !== null ? e(n.content) ? n.content(r.value, i) : u(n.content, {
|
|
20
|
+
...t,
|
|
21
|
+
props: {
|
|
22
|
+
...n,
|
|
23
|
+
...t
|
|
24
|
+
},
|
|
25
|
+
slots: o
|
|
26
|
+
}) : n.content : null;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
j as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FieldContextKey as d, useIsFieldValid as m, useIsFieldTouched as n, useIsFieldDirty as f, useFieldError as l } from "vee-validate";
|
|
2
|
+
import { inject as r } from "vue";
|
|
3
|
+
import { FORM_ITEM_INJECTION_KEY as u } from "./injectionKeys.js";
|
|
4
|
+
function a() {
|
|
5
|
+
const i = r(d), t = r(u);
|
|
6
|
+
if (!i) throw new Error("useFormField should be used within <FormField>");
|
|
7
|
+
const { name: e } = i, o = t, s = {
|
|
8
|
+
error: l(e),
|
|
9
|
+
isDirty: f(e),
|
|
10
|
+
isTouched: n(e),
|
|
11
|
+
valid: m(e)
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
formDescriptionId: `${o}-form-item-description`,
|
|
15
|
+
formItemId: `${o}-form-item`,
|
|
16
|
+
formMessageId: `${o}-form-item-message`,
|
|
17
|
+
id: o,
|
|
18
|
+
name: e,
|
|
19
|
+
...s
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
a as useFormField
|
|
24
|
+
};
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { defineComponent as fe, useTemplateRef as K, computed as i, reactive as pe, markRaw as ve, toRaw as he, watch as G, nextTick as be, onUnmounted as ye, createBlock as h, createCommentVNode as m, unref as l, openBlock as u, mergeProps as N, withCtx as b, withDirectives as Ce, createVNode as w, createElementVNode as $, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as ge, normalizeProps as we, guardReactiveProps as Fe, resolveDynamicComponent as Re, createSlots as Se, renderList as ke, Transition as Ne, vShow as Oe } from "vue";
|
|
2
|
+
import Ee from "../form/FormControl.vue.js";
|
|
3
|
+
import Be from "../form/FormDescription.vue.js";
|
|
4
|
+
import Pe from "../form/FormItem.vue.js";
|
|
5
|
+
import { isString as y, isFunction as q, clnm as j, isObject as Te } from "@dazhicheng/utils";
|
|
6
|
+
import Ve from "../form/FormMessageToolTip.vue.js";
|
|
7
|
+
import Ie from "../form/FormMessage.vue.js";
|
|
8
|
+
import "../../../tt-icon/index.js";
|
|
9
|
+
import "@vueuse/core";
|
|
10
|
+
import "element-plus";
|
|
11
|
+
import { useFormValues as Le, useFieldError as $e, Field as qe } from "vee-validate";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import E from "../form/RenderContent.vue.js";
|
|
14
|
+
import { set as je, get as Me } from "lodash-es";
|
|
15
|
+
import { toTypedSchema as Ue } from "@vee-validate/zod";
|
|
16
|
+
import { injectComponentRefMap as De } from "../useFormContext.js";
|
|
17
|
+
import { useFormContext as We, injectRenderFormProps as ze } from "./context.js";
|
|
18
|
+
import xe from "./dependencies.js";
|
|
19
|
+
import Ae from "./FormLabel.vue2.js";
|
|
20
|
+
import { useSelectCollapseOptions as Ke } from "../hooks/useSelectCollapse.js";
|
|
21
|
+
import { isEventObjectLike as Q } from "./helper.js";
|
|
22
|
+
const Ge = { class: "flex-auto overflow-hidden" }, He = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "ml-1"
|
|
25
|
+
}, hn = /* @__PURE__ */ fe({
|
|
26
|
+
__name: "FormField",
|
|
27
|
+
props: {
|
|
28
|
+
component: {},
|
|
29
|
+
componentProps: { type: [Function, Object] },
|
|
30
|
+
defaultValue: {},
|
|
31
|
+
dependencies: {},
|
|
32
|
+
description: { type: [Function, String] },
|
|
33
|
+
fieldName: {},
|
|
34
|
+
help: { type: [Function, String] },
|
|
35
|
+
hide: { type: Boolean },
|
|
36
|
+
label: { type: [Function, String] },
|
|
37
|
+
renderComponentContent: { type: Function },
|
|
38
|
+
rules: {},
|
|
39
|
+
suffix: { type: [Function, String] },
|
|
40
|
+
helpTrigger: {},
|
|
41
|
+
toolTip: {},
|
|
42
|
+
toolTipText: { type: [Function, String] },
|
|
43
|
+
useArraySchema: { type: Boolean },
|
|
44
|
+
arraySchema: { type: [Array, Function] },
|
|
45
|
+
colon: { type: Boolean },
|
|
46
|
+
controlClass: {},
|
|
47
|
+
disabled: { type: Boolean },
|
|
48
|
+
disabledOnChangeListener: { type: Boolean },
|
|
49
|
+
disabledOnInputListener: { type: Boolean },
|
|
50
|
+
emptyStateValue: {},
|
|
51
|
+
formFieldProps: {},
|
|
52
|
+
formItemClass: { type: [Function, String] },
|
|
53
|
+
hideLabel: { type: Boolean },
|
|
54
|
+
hideRequiredMark: { type: Boolean },
|
|
55
|
+
labelClass: {},
|
|
56
|
+
labelWidth: {},
|
|
57
|
+
modelPropName: {},
|
|
58
|
+
wrapperClass: {},
|
|
59
|
+
commonComponentProps: {}
|
|
60
|
+
},
|
|
61
|
+
setup(n) {
|
|
62
|
+
const B = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = We(), M = ze(), k = Le(), Z = $e(n.fieldName), f = K("fieldComponentRef"), F = M.form, R = i(() => M.compact), S = i(() => {
|
|
63
|
+
var e;
|
|
64
|
+
return ((e = Z.value) == null ? void 0 : e.length) > 0;
|
|
65
|
+
}), P = pe(
|
|
66
|
+
new Proxy({}, {
|
|
67
|
+
/**
|
|
68
|
+
* @param _target 代理目标(空对象,不实际存储)
|
|
69
|
+
* @param key 属性名
|
|
70
|
+
* @returns 当前表单值
|
|
71
|
+
*/
|
|
72
|
+
get(e, t) {
|
|
73
|
+
return Me(k.value, t);
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* @param _target 代理目标
|
|
77
|
+
* @param key 属性名
|
|
78
|
+
* @param value 新值
|
|
79
|
+
* @returns 是否设置成功
|
|
80
|
+
*/
|
|
81
|
+
set(e, t, o) {
|
|
82
|
+
return je(k.value, t, o), F == null || F.validateField(t), !0;
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
), _ = i(() => {
|
|
86
|
+
const e = y(n.component) ? Y.value[n.component] : n.component;
|
|
87
|
+
return ve(he(e));
|
|
88
|
+
}), { dynamicComponentProps: ee, dynamicRules: ne, isDisabled: te, isIf: U, isRequired: T, isShow: D } = xe(
|
|
89
|
+
() => n.dependencies
|
|
90
|
+
), oe = i(() => {
|
|
91
|
+
var e;
|
|
92
|
+
return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
|
|
93
|
+
width: `${n.labelWidth}px`
|
|
94
|
+
};
|
|
95
|
+
}), s = i(() => ne.value || n.rules), W = i(() => !n.hide && U.value && D.value), V = i(() => {
|
|
96
|
+
var o, a, d;
|
|
97
|
+
if (!W.value)
|
|
98
|
+
return !1;
|
|
99
|
+
if (!s.value)
|
|
100
|
+
return T.value;
|
|
101
|
+
if (T.value)
|
|
102
|
+
return !0;
|
|
103
|
+
if (y(s.value))
|
|
104
|
+
return ["required", "selectRequired"].includes(s.value);
|
|
105
|
+
let e = (a = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : a.call(o);
|
|
106
|
+
const t = s.value.def;
|
|
107
|
+
if ((t == null ? void 0 : t.type) === "default" && "innerType" in t) {
|
|
108
|
+
const v = t.innerType;
|
|
109
|
+
v && (e = (d = v.isOptional) == null ? void 0 : d.call(v));
|
|
110
|
+
}
|
|
111
|
+
return !e;
|
|
112
|
+
}), le = i(() => {
|
|
113
|
+
var o;
|
|
114
|
+
if (!W.value)
|
|
115
|
+
return null;
|
|
116
|
+
let e = s.value;
|
|
117
|
+
if (!e)
|
|
118
|
+
return T.value ? "required" : null;
|
|
119
|
+
if (y(e))
|
|
120
|
+
return e;
|
|
121
|
+
if (!!V.value) {
|
|
122
|
+
const a = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
|
|
123
|
+
a && (e = a);
|
|
124
|
+
}
|
|
125
|
+
return Ue(e);
|
|
126
|
+
}), r = i(() => {
|
|
127
|
+
const e = q(n.componentProps) ? n.componentProps(k.value, F) : n.componentProps;
|
|
128
|
+
return {
|
|
129
|
+
...n.commonComponentProps,
|
|
130
|
+
...e,
|
|
131
|
+
...ee.value
|
|
132
|
+
};
|
|
133
|
+
}), { selectComponentProps: ae } = Ke(
|
|
134
|
+
i(() => ({
|
|
135
|
+
componentProps: r,
|
|
136
|
+
component: n.component,
|
|
137
|
+
selectWrapRef: B,
|
|
138
|
+
selectRef: f
|
|
139
|
+
}))
|
|
140
|
+
);
|
|
141
|
+
G(
|
|
142
|
+
() => {
|
|
143
|
+
var e;
|
|
144
|
+
return (e = r.value) == null ? void 0 : e.autofocus;
|
|
145
|
+
},
|
|
146
|
+
(e) => {
|
|
147
|
+
e === !0 && be(() => {
|
|
148
|
+
ce();
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
{ immediate: !0 }
|
|
152
|
+
);
|
|
153
|
+
const I = i(() => {
|
|
154
|
+
var e;
|
|
155
|
+
return te.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
|
|
156
|
+
}), z = i(() => q(n.renderComponentContent) ? n.renderComponentContent(k.value, F) : {}), ie = i(() => Object.keys(z.value)), re = i(() => {
|
|
157
|
+
const e = le.value;
|
|
158
|
+
return {
|
|
159
|
+
keepValue: !0,
|
|
160
|
+
label: y(n.label) ? n.label : "",
|
|
161
|
+
...e ? { rules: e } : {},
|
|
162
|
+
...n.formFieldProps
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
function ue(e) {
|
|
166
|
+
var v;
|
|
167
|
+
const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], a = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
|
|
168
|
+
let d = t;
|
|
169
|
+
if (t && Te(t) && a) {
|
|
170
|
+
const c = t.target;
|
|
171
|
+
d = Q(t) ? c == null ? void 0 : c[a] : (t == null ? void 0 : t[a]) ?? t;
|
|
172
|
+
}
|
|
173
|
+
return a ? {
|
|
174
|
+
[`onUpdate:${a}`]: o,
|
|
175
|
+
[a]: d === void 0 ? n.emptyStateValue : d,
|
|
176
|
+
onChange: n.disabledOnChangeListener ? void 0 : (c) => {
|
|
177
|
+
var A;
|
|
178
|
+
const me = Q(c), g = (A = e == null ? void 0 : e.componentField) == null ? void 0 : A.onChange;
|
|
179
|
+
if (!me)
|
|
180
|
+
return g == null ? void 0 : g(c);
|
|
181
|
+
const L = c.target;
|
|
182
|
+
return g == null ? void 0 : g((L == null ? void 0 : L[a]) ?? c);
|
|
183
|
+
},
|
|
184
|
+
...n.disabledOnInputListener ? { onInput: void 0 } : {}
|
|
185
|
+
} : {
|
|
186
|
+
...n.disabledOnInputListener ? { onInput: void 0 } : {},
|
|
187
|
+
...n.disabledOnChangeListener ? { onChange: void 0 } : {}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
const se = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), de = /* @__PURE__ */ new Set(["ElInputNumber"]);
|
|
191
|
+
function x(e) {
|
|
192
|
+
const t = ue(e), o = {
|
|
193
|
+
...e.componentField,
|
|
194
|
+
...r.value,
|
|
195
|
+
...ae.value,
|
|
196
|
+
...t,
|
|
197
|
+
...Reflect.has(r.value, "onChange") ? { onChange: r.value.onChange } : {},
|
|
198
|
+
...Reflect.has(r.value, "onInput") ? { onInput: r.value.onInput } : {}
|
|
199
|
+
};
|
|
200
|
+
return Reflect.has(r.value, "name") || delete o.name, y(n.component) && se.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && de.has(n.component) && (o.controls = !1, o.align = "left"), o;
|
|
201
|
+
}
|
|
202
|
+
function ce() {
|
|
203
|
+
var e, t;
|
|
204
|
+
f.value && q(f.value.focus) && // 检查当前是否有元素被聚焦
|
|
205
|
+
document.activeElement !== f.value && ((t = (e = f.value) == null ? void 0 : e.focus) == null || t.call(e));
|
|
206
|
+
}
|
|
207
|
+
const p = De();
|
|
208
|
+
return G(f, (e) => {
|
|
209
|
+
p == null || p.set(n.fieldName, e);
|
|
210
|
+
}), ye(() => {
|
|
211
|
+
p != null && p.has(n.fieldName) && p.delete(n.fieldName);
|
|
212
|
+
}), (e, t) => !e.hide && l(U) ? (u(), h(l(qe), N({ key: 0 }, re.value, { name: e.fieldName }), {
|
|
213
|
+
default: b((o) => [
|
|
214
|
+
Ce(w(l(Pe), N({
|
|
215
|
+
class: [{
|
|
216
|
+
"form-valid-error": S.value,
|
|
217
|
+
"form-is-required": V.value,
|
|
218
|
+
"pb-(--form-valid-error-nocompact-padding-bottom)": !R.value,
|
|
219
|
+
"pb-2": R.value
|
|
220
|
+
}, "relative"]
|
|
221
|
+
}, e.$attrs), {
|
|
222
|
+
default: b(() => [
|
|
223
|
+
$("div", {
|
|
224
|
+
class: O([{ "flex-col": l(C), "flex-row items-center": !l(C) }, "flex"])
|
|
225
|
+
}, [
|
|
226
|
+
e.hideLabel ? m("", !0) : (u(), h(Ae, {
|
|
227
|
+
key: 0,
|
|
228
|
+
class: O(
|
|
229
|
+
l(j)(
|
|
230
|
+
"flex leading-6",
|
|
231
|
+
{
|
|
232
|
+
"mr-2 shrink-0 items-center justify-end": !l(C),
|
|
233
|
+
"mb-1 flex-row": l(C)
|
|
234
|
+
},
|
|
235
|
+
e.labelClass
|
|
236
|
+
)
|
|
237
|
+
),
|
|
238
|
+
help: e.help,
|
|
239
|
+
colon: e.colon,
|
|
240
|
+
label: e.label,
|
|
241
|
+
required: V.value && !e.hideRequiredMark,
|
|
242
|
+
style: J(oe.value),
|
|
243
|
+
"tool-tip": e.toolTip,
|
|
244
|
+
"help-trigger": e.helpTrigger,
|
|
245
|
+
form: P,
|
|
246
|
+
"tool-tip-text": e.toolTipText
|
|
247
|
+
}, {
|
|
248
|
+
default: b(() => [
|
|
249
|
+
e.label ? (u(), h(l(E), {
|
|
250
|
+
key: 0,
|
|
251
|
+
content: e.label
|
|
252
|
+
}, null, 8, ["content"])) : m("", !0)
|
|
253
|
+
]),
|
|
254
|
+
_: 1
|
|
255
|
+
}, 8, ["class", "help", "colon", "label", "required", "style", "tool-tip", "help-trigger", "form", "tool-tip-text"])),
|
|
256
|
+
$("div", Ge, [
|
|
257
|
+
$("div", {
|
|
258
|
+
ref_key: "wrapperRef",
|
|
259
|
+
ref: B,
|
|
260
|
+
class: O(l(j)("relative flex w-full items-center", e.wrapperClass))
|
|
261
|
+
}, [
|
|
262
|
+
w(l(Ee), {
|
|
263
|
+
class: O(l(j)(e.controlClass))
|
|
264
|
+
}, {
|
|
265
|
+
default: b(() => [
|
|
266
|
+
ge(e.$slots, "default", we(Fe({
|
|
267
|
+
...o,
|
|
268
|
+
...x(o),
|
|
269
|
+
disabled: I.value,
|
|
270
|
+
isInValid: S.value,
|
|
271
|
+
form: P,
|
|
272
|
+
fieldName: e.fieldName
|
|
273
|
+
})), () => [
|
|
274
|
+
(u(), h(Re(_.value), N({
|
|
275
|
+
ref_key: "fieldComponentRef",
|
|
276
|
+
ref: f,
|
|
277
|
+
class: {
|
|
278
|
+
"border-destructive hover:border-destructive/80 focus:border-destructive focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]": S.value
|
|
279
|
+
}
|
|
280
|
+
}, {
|
|
281
|
+
...x(o),
|
|
282
|
+
disabled: I.value,
|
|
283
|
+
isInValid: S.value,
|
|
284
|
+
form: P,
|
|
285
|
+
fieldName: e.fieldName
|
|
286
|
+
}, { disabled: I.value }), Se({ _: 2 }, [
|
|
287
|
+
ke(ie.value, (a) => ({
|
|
288
|
+
name: a,
|
|
289
|
+
fn: b((d) => [
|
|
290
|
+
w(l(E), N({
|
|
291
|
+
content: z.value[a]
|
|
292
|
+
}, { ...d, formContext: o }), null, 16, ["content"])
|
|
293
|
+
])
|
|
294
|
+
}))
|
|
295
|
+
]), 1040, ["class", "disabled"]))
|
|
296
|
+
])
|
|
297
|
+
]),
|
|
298
|
+
_: 2
|
|
299
|
+
}, 1032, ["class"]),
|
|
300
|
+
e.suffix ? (u(), H("div", He, [
|
|
301
|
+
w(l(E), { content: e.suffix }, null, 8, ["content"])
|
|
302
|
+
])) : m("", !0),
|
|
303
|
+
R.value && S.value ? (u(), h(l(Ve), {
|
|
304
|
+
key: 1,
|
|
305
|
+
"ref-dom": B.value
|
|
306
|
+
}, null, 8, ["ref-dom"])) : m("", !0)
|
|
307
|
+
], 2)
|
|
308
|
+
])
|
|
309
|
+
], 2),
|
|
310
|
+
e.description || !R.value ? (u(), H("div", {
|
|
311
|
+
key: 0,
|
|
312
|
+
style: J(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
|
|
313
|
+
}, [
|
|
314
|
+
e.description ? (u(), h(l(Be), {
|
|
315
|
+
key: 0,
|
|
316
|
+
class: "text-[12px]"
|
|
317
|
+
}, {
|
|
318
|
+
default: b(() => [
|
|
319
|
+
w(l(E), { content: e.description }, null, 8, ["content"])
|
|
320
|
+
]),
|
|
321
|
+
_: 1
|
|
322
|
+
})) : m("", !0),
|
|
323
|
+
R.value ? m("", !0) : (u(), h(Ne, {
|
|
324
|
+
key: 1,
|
|
325
|
+
name: "slide-up"
|
|
326
|
+
}, {
|
|
327
|
+
default: b(() => [
|
|
328
|
+
w(l(Ie), { class: "absolute" })
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
}))
|
|
332
|
+
], 4)) : m("", !0)
|
|
333
|
+
]),
|
|
334
|
+
_: 2
|
|
335
|
+
}, 1040, ["class"]), [
|
|
336
|
+
[Oe, l(D)]
|
|
337
|
+
])
|
|
338
|
+
]),
|
|
339
|
+
_: 3
|
|
340
|
+
}, 16, ["name"])) : m("", !0);
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
export {
|
|
344
|
+
hn as default
|
|
345
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as a, h as l } from "vue";
|
|
2
|
+
import i from "../group-form/LazyFormField.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { FormArrayRegister as m } from "./array-register/FormArrayRegister.js";
|
|
5
|
+
import o from "./FormField.vue2.js";
|
|
6
|
+
const c = a({
|
|
7
|
+
name: "FieldRenderer",
|
|
8
|
+
props: {
|
|
9
|
+
fieldConfig: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: !0
|
|
12
|
+
},
|
|
13
|
+
rules: { type: [String, Object], default: void 0 },
|
|
14
|
+
virtual: { type: Boolean, default: !1 },
|
|
15
|
+
scrollElement: { type: Object, default: null },
|
|
16
|
+
rootMargin: { type: String, default: "200px 0px" },
|
|
17
|
+
estimateFieldHeight: { type: Number, default: 52 }
|
|
18
|
+
},
|
|
19
|
+
setup(r, { slots: t }) {
|
|
20
|
+
return () => {
|
|
21
|
+
const e = {
|
|
22
|
+
commonComponentProps: {},
|
|
23
|
+
...r.fieldConfig
|
|
24
|
+
};
|
|
25
|
+
return e.useArraySchema ? l(
|
|
26
|
+
m,
|
|
27
|
+
{
|
|
28
|
+
...e,
|
|
29
|
+
rules: r.rules,
|
|
30
|
+
virtual: r.virtual,
|
|
31
|
+
arraySchema: e.arraySchema,
|
|
32
|
+
fieldName: e.fieldName,
|
|
33
|
+
formItemClass: e.formItemClass,
|
|
34
|
+
wrapperClass: e.wrapperClass
|
|
35
|
+
},
|
|
36
|
+
t
|
|
37
|
+
) : r.virtual ? l(
|
|
38
|
+
i,
|
|
39
|
+
{
|
|
40
|
+
fieldProps: e,
|
|
41
|
+
rules: r.rules,
|
|
42
|
+
fieldClass: e.formItemClass,
|
|
43
|
+
scrollElement: r.scrollElement,
|
|
44
|
+
rootMargin: r.rootMargin,
|
|
45
|
+
estimateFieldHeight: r.estimateFieldHeight
|
|
46
|
+
},
|
|
47
|
+
t
|
|
48
|
+
) : l(o, { ...e, class: e.formItemClass, rules: r.rules }, t);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
c as FieldRenderer
|
|
54
|
+
};
|