@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,191 @@
|
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var C = (o, t, e) => t in o ? g(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var i = (o, t, e) => C(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { mergeWithArrayOverride as d, bindMethods as D, isElement as S, isFunction as m } from "@dazhicheng/utils";
|
|
5
|
+
import { ElMessageBox as b } from "element-plus";
|
|
6
|
+
import { GlobalConfig as v } from "../../../../hooks/useSetup.js";
|
|
7
|
+
import { Store as y } from "@tanstack/vue-store";
|
|
8
|
+
import { useDebounceFn as k } from "@vueuse/core";
|
|
9
|
+
import { computed as x } from "vue";
|
|
10
|
+
class E {
|
|
11
|
+
/** 构造函数,初始化抽屉的API接口和状态 */
|
|
12
|
+
constructor(t = {}) {
|
|
13
|
+
/** el-drawer 实例的引用 */
|
|
14
|
+
i(this, "drawerRef", null);
|
|
15
|
+
/** 共享数据对象,用于在组件间传递数据 */
|
|
16
|
+
i(this, "sharedData", {
|
|
17
|
+
payload: {}
|
|
18
|
+
});
|
|
19
|
+
/** 状态存储对象,使用Store管理抽屉的各种状态 */
|
|
20
|
+
i(this, "store");
|
|
21
|
+
/** 抽屉的API接口,用于处理外部事件 */
|
|
22
|
+
i(this, "api");
|
|
23
|
+
/** 抽屉的当前状态,使用Partial<TtDrawerProps>类型 */
|
|
24
|
+
i(this, "state");
|
|
25
|
+
/**
|
|
26
|
+
* 确认操作
|
|
27
|
+
*/
|
|
28
|
+
i(this, "onOk", k(async () => {
|
|
29
|
+
var t, e;
|
|
30
|
+
try {
|
|
31
|
+
this.setDrawerProps({ confirmLoading: !0 }), this.api.onOk && await ((e = (t = this.api).onOk) == null ? void 0 : e.call(t));
|
|
32
|
+
} catch (s) {
|
|
33
|
+
throw new Error(s);
|
|
34
|
+
} finally {
|
|
35
|
+
this.setDrawerProps({ confirmLoading: !1 });
|
|
36
|
+
}
|
|
37
|
+
}, 100));
|
|
38
|
+
/**
|
|
39
|
+
* 获取抽屉的可见状态
|
|
40
|
+
* @returns 抽屉的可见状态
|
|
41
|
+
*/
|
|
42
|
+
i(this, "getVisible", x(() => this.state.visible));
|
|
43
|
+
const {
|
|
44
|
+
connectedComponent: e,
|
|
45
|
+
onOk: s,
|
|
46
|
+
onClose: a,
|
|
47
|
+
onClosed: r,
|
|
48
|
+
onVisibleChange: n,
|
|
49
|
+
onReceiveSharedData: l,
|
|
50
|
+
...c
|
|
51
|
+
} = t, w = {
|
|
52
|
+
confirmLoading: !1,
|
|
53
|
+
showCancelBtn: !0,
|
|
54
|
+
cancelButtonProps: {},
|
|
55
|
+
cancelText: "取消",
|
|
56
|
+
showOkBtn: !0,
|
|
57
|
+
okButtonProps: {
|
|
58
|
+
type: "primary"
|
|
59
|
+
},
|
|
60
|
+
okText: "确定",
|
|
61
|
+
showFooter: !0,
|
|
62
|
+
footerHeight: 50,
|
|
63
|
+
size: "30%",
|
|
64
|
+
title: "",
|
|
65
|
+
class: "",
|
|
66
|
+
loadingText: "数据加载中...",
|
|
67
|
+
visible: !1,
|
|
68
|
+
loading: !1,
|
|
69
|
+
maskClosable: !0,
|
|
70
|
+
destroyOnClose: !1,
|
|
71
|
+
closeFunc: void 0,
|
|
72
|
+
showConfirm: !1,
|
|
73
|
+
modal: v.showMask
|
|
74
|
+
};
|
|
75
|
+
this.store = new y(d(c, w), {
|
|
76
|
+
onUpdate: () => {
|
|
77
|
+
var f, p, u;
|
|
78
|
+
const h = this.store.state;
|
|
79
|
+
h.visible === ((f = this.state) == null ? void 0 : f.visible) ? this.state = h : (this.state = h, (u = (p = this.api).onVisibleChange) == null || u.call(p, h.visible || !1));
|
|
80
|
+
}
|
|
81
|
+
}), this.state = this.store.state, this.api = {
|
|
82
|
+
onOk: s,
|
|
83
|
+
onClose: a,
|
|
84
|
+
onClosed: r,
|
|
85
|
+
onVisibleChange: n,
|
|
86
|
+
onReceiveSharedData: l
|
|
87
|
+
}, D(this);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 关闭抽屉
|
|
91
|
+
* @description 关闭抽屉时会调用 closeFunc 钩子函数,如果 onBeforeClose 返回 false,则不关闭弹窗
|
|
92
|
+
*/
|
|
93
|
+
async close() {
|
|
94
|
+
const t = document.querySelector('.viewer-container[aria-modal="true"]');
|
|
95
|
+
if (S(t))
|
|
96
|
+
return;
|
|
97
|
+
const { closeFunc: e, confirmContent: s } = this.state, a = async () => {
|
|
98
|
+
var n, l;
|
|
99
|
+
let r = !0;
|
|
100
|
+
e && m(e) && (r = await e()), this.setState((c) => ({ ...c, visible: !r })), (l = (n = this.api).onClosed) == null || l.call(n);
|
|
101
|
+
};
|
|
102
|
+
this.state.showConfirm ? b.confirm(s, "温馨提示", {
|
|
103
|
+
confirmButtonText: "确定",
|
|
104
|
+
cancelButtonText: "取消",
|
|
105
|
+
type: "warning"
|
|
106
|
+
}).then(() => {
|
|
107
|
+
a();
|
|
108
|
+
}) : a();
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 挂载抽屉实例和API接口
|
|
112
|
+
* @param drawerRef - el-drawer 实例
|
|
113
|
+
* @param api - 外部传入的API接口
|
|
114
|
+
*/
|
|
115
|
+
mount(t, e = {}) {
|
|
116
|
+
this.api = d(e, this.api), this.drawerRef = t;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 获取共享数据
|
|
120
|
+
* @returns 共享数据对象
|
|
121
|
+
*/
|
|
122
|
+
getData() {
|
|
123
|
+
var t;
|
|
124
|
+
return ((t = this.sharedData) == null ? void 0 : t.payload) ?? {};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* 取消操作
|
|
128
|
+
*/
|
|
129
|
+
onClosed() {
|
|
130
|
+
var t, e;
|
|
131
|
+
this.api.onClose ? (e = (t = this.api).onClose) == null || e.call(t) : this.close();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 设置抽屉的状态
|
|
135
|
+
* @param stateOrFn - 状态对象或状态函数
|
|
136
|
+
* @returns 当前实例
|
|
137
|
+
*/
|
|
138
|
+
setState(t) {
|
|
139
|
+
return m(t) ? this.store.setState(t) : this.store.setState((e) => ({ ...e, ...t })), this;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 设置抽屉的属性
|
|
143
|
+
* @param props - 属性对象
|
|
144
|
+
* @returns 当前实例
|
|
145
|
+
*/
|
|
146
|
+
setDrawerProps(t) {
|
|
147
|
+
return this.setState(t);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* 设置抽屉的加载状态
|
|
151
|
+
* @param loading - 是否加载中
|
|
152
|
+
* @returns 当前实例
|
|
153
|
+
*/
|
|
154
|
+
changeLoading(t = !0) {
|
|
155
|
+
return this.setState({ loading: t });
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* 设置确认按钮的加载状态
|
|
159
|
+
* @param loading - 是否加载中
|
|
160
|
+
* @returns 当前实例
|
|
161
|
+
*/
|
|
162
|
+
changeOkLoading(t = !0) {
|
|
163
|
+
return this.setState({ confirmLoading: t });
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* 打开抽屉
|
|
167
|
+
* @param visible - 是否可见
|
|
168
|
+
* @param data - 共享数据
|
|
169
|
+
*/
|
|
170
|
+
openDrawer(t = !0, e) {
|
|
171
|
+
this.setState({ visible: t }), this.setData(e);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* 设置共享数据
|
|
175
|
+
* @param payload - 共享数据
|
|
176
|
+
* @returns 当前实例
|
|
177
|
+
*/
|
|
178
|
+
setData(t) {
|
|
179
|
+
var e, s;
|
|
180
|
+
return this.sharedData.payload = t, (s = (e = this.api).onReceiveSharedData) == null || s.call(e, t), this;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* 关闭抽屉
|
|
184
|
+
*/
|
|
185
|
+
closeDrawer() {
|
|
186
|
+
this.setState({ visible: !1 });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
export {
|
|
190
|
+
E as DrawerApi
|
|
191
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as p, ref as g, createVNode as a, mergeProps as f, renderSlot as c } from "vue";
|
|
2
|
+
import { withInstall as u } from "@dazhicheng/utils";
|
|
3
|
+
import { emptyProps as y, ElEmpty as E, ElImage as d } from "element-plus";
|
|
4
|
+
import { omit as l } from "lodash-es";
|
|
5
|
+
import I from "../../assets/img/empty_images/no_data.png.js";
|
|
6
|
+
const b = u(/* @__PURE__ */ p({
|
|
7
|
+
name: "TtEmpty",
|
|
8
|
+
props: y,
|
|
9
|
+
slots: Object,
|
|
10
|
+
setup(m, {
|
|
11
|
+
expose: i,
|
|
12
|
+
slots: e
|
|
13
|
+
}) {
|
|
14
|
+
const n = l(e, ["image"]), t = g(), r = m.image || e.image;
|
|
15
|
+
return i({
|
|
16
|
+
elemptyRef: t
|
|
17
|
+
}), () => a(E, f(m, {
|
|
18
|
+
image: r ? m.image : "",
|
|
19
|
+
ref: t
|
|
20
|
+
}), {
|
|
21
|
+
image: () => {
|
|
22
|
+
var o;
|
|
23
|
+
return r ? (o = e.image) == null ? void 0 : o.call(e) : c(e, "image", {}, () => [a(d, {
|
|
24
|
+
src: I
|
|
25
|
+
}, null)]);
|
|
26
|
+
},
|
|
27
|
+
...n
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
export {
|
|
32
|
+
b as TtEmpty,
|
|
33
|
+
b as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isEmpty as o } from "@dazhicheng/utils";
|
|
2
|
+
import { setupForm as i } from "./src/config.js";
|
|
3
|
+
import { COMPONENT_MAP as J } from "./src/config.js";
|
|
4
|
+
import { globalShareState as p } from "./src/shared/global-state.js";
|
|
5
|
+
import "vue";
|
|
6
|
+
import "@tanstack/vue-store";
|
|
7
|
+
import "dayjs";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
9
|
+
import "lodash-es";
|
|
10
|
+
import "es-toolkit/compat";
|
|
11
|
+
import "vee-validate";
|
|
12
|
+
import * as M from "zod";
|
|
13
|
+
import "./src/shared/zod-defaults.js";
|
|
14
|
+
import "@dazhicheng/hooks";
|
|
15
|
+
import "@vueuse/core";
|
|
16
|
+
import "../tt-button/index.js";
|
|
17
|
+
import "../tt-icon/index.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
/* empty css */
|
|
20
|
+
import "./src/components/Slot.js";
|
|
21
|
+
import "../tt-form-item-error-tooltip/index.js";
|
|
22
|
+
import "element-plus";
|
|
23
|
+
/* empty css */
|
|
24
|
+
import "./src/form/RenderContent.vue.js";
|
|
25
|
+
import "@vee-validate/zod";
|
|
26
|
+
import "../tt-text/index.js";
|
|
27
|
+
import "./src/form-render/FormFieldContact.js";
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
|
+
import "../tt-nav-anchor/index.js";
|
|
31
|
+
/* empty css */
|
|
32
|
+
/* empty css */
|
|
33
|
+
function D(t, m) {
|
|
34
|
+
i({
|
|
35
|
+
config: {
|
|
36
|
+
// vue组件库默认都是 modelValue
|
|
37
|
+
baseModelPropName: "modelValue",
|
|
38
|
+
// 一些组件是 v-model:checked 或者 v-model:fileList
|
|
39
|
+
modelPropNameMap: {
|
|
40
|
+
...m
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
defineRules: {
|
|
44
|
+
required: (r, e, n) => o(r) || typeof r == "string" && r.trim().length === 0 ? "请输入" : !0,
|
|
45
|
+
// 选择项目必填国际化适配
|
|
46
|
+
selectRequired: (r) => o(r) ? "请选择" : !0,
|
|
47
|
+
...t
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function G(t) {
|
|
52
|
+
p.setComponents({ ...t });
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
J as COMPONENT_MAP,
|
|
56
|
+
G as addComponent,
|
|
57
|
+
D as setConfig,
|
|
58
|
+
M as z
|
|
59
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as i, mergeModels as m, useModel as c, createElementBlock as d, openBlock as p, normalizeClass as u, unref as o, renderSlot as r, createElementVNode as n, createVNode as f } from "vue";
|
|
2
|
+
import { clnm as v } from "@dazhicheng/utils";
|
|
3
|
+
import x from "../../../../assets/svg/arrowLineDown.svg.js";
|
|
4
|
+
import w from "../../../../assets/svg/arrowUp.svg.js";
|
|
5
|
+
import { TtIcon as _ } from "../../../tt-icon/index.js";
|
|
6
|
+
const V = { class: "ml-1 flex items-center cursor-pointer" }, E = { class: "tt-expandable-arrow__icon flex h-[20px] w-[20px] items-center justify-center rounded-full" }, b = /* @__PURE__ */ i({
|
|
7
|
+
__name: "ExpandableArrow",
|
|
8
|
+
props: /* @__PURE__ */ m({
|
|
9
|
+
class: {}
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: { default: !1, type: Boolean },
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(l) {
|
|
16
|
+
const a = l, e = c(l, "modelValue");
|
|
17
|
+
return (t, s) => (p(), d("div", {
|
|
18
|
+
class: u(o(v)("flex items-center h-[28px]", a.class)),
|
|
19
|
+
onClick: s[0] || (s[0] = (h) => e.value = !e.value)
|
|
20
|
+
}, [
|
|
21
|
+
r(t.$slots, "default", { isExpanded: e.value }),
|
|
22
|
+
n("div", V, [
|
|
23
|
+
r(t.$slots, "icon", {}, () => [
|
|
24
|
+
n("div", E, [
|
|
25
|
+
f(o(_), {
|
|
26
|
+
icon: e.value ? o(x) : o(w),
|
|
27
|
+
size: 12,
|
|
28
|
+
"is-custom-svg": ""
|
|
29
|
+
}, null, 8, ["icon"])
|
|
30
|
+
])
|
|
31
|
+
])
|
|
32
|
+
])
|
|
33
|
+
], 2));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
b as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { defineComponent as O, useModel as _, useAttrs as E, computed as d, unref as o, ref as L, watch as M, onMounted as W, createElementBlock as C, openBlock as l, normalizeClass as I, createCommentVNode as u, renderSlot as f, createBlock as v, Fragment as x, resolveDynamicComponent as b, mergeProps as g, withCtx as k, createTextVNode as B, toDisplayString as R, toRaw as F, nextTick as H } from "vue";
|
|
2
|
+
import { triggerWindowResize as U, clnm as q, isFunction as G } from "@dazhicheng/utils";
|
|
3
|
+
import { TtButton as V } from "../../../tt-button/index.js";
|
|
4
|
+
import { useDesign as J } from "@dazhicheng/hooks";
|
|
5
|
+
import K from "./ExpandableArrow.vue2.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { injectFormProps as Q } from "../useFormContext.js";
|
|
8
|
+
const ne = /* @__PURE__ */ O({
|
|
9
|
+
__name: "FormActions",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: { default: !1, type: Boolean },
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(S, { expose: $ }) {
|
|
16
|
+
const [n, j] = Q(), c = _(S, "modelValue"), { prefixCls: A } = J("form-submit-btn"), D = E(), h = d(() => ({
|
|
17
|
+
content: "重置",
|
|
18
|
+
show: !0,
|
|
19
|
+
...o(n).resetButtonOptions
|
|
20
|
+
})), i = d(() => ({
|
|
21
|
+
content: "查询",
|
|
22
|
+
show: !0,
|
|
23
|
+
...o(n).submitButtonOptions
|
|
24
|
+
})), m = L(!1), T = d(() => o(n).showCollapseButton && m.value);
|
|
25
|
+
async function w(e) {
|
|
26
|
+
var r;
|
|
27
|
+
e == null || e.preventDefault(), e == null || e.stopPropagation();
|
|
28
|
+
const t = o(n);
|
|
29
|
+
if (!t.formApi)
|
|
30
|
+
return;
|
|
31
|
+
const { valid: a } = await t.formApi.validate();
|
|
32
|
+
if (!a)
|
|
33
|
+
return;
|
|
34
|
+
const s = F(await t.formApi.getValues()) ?? {};
|
|
35
|
+
await ((r = t.handleSubmit) == null ? void 0 : r.call(t, s));
|
|
36
|
+
}
|
|
37
|
+
async function P(e) {
|
|
38
|
+
var s, r;
|
|
39
|
+
e == null || e.preventDefault(), e == null || e.stopPropagation();
|
|
40
|
+
const t = o(n), a = F(await ((s = t.formApi) == null ? void 0 : s.getValues())) ?? {};
|
|
41
|
+
G(t.handleReset) ? await ((r = t.handleReset) == null ? void 0 : r.call(t, a)) : j.resetForm({}, { force: !0 });
|
|
42
|
+
}
|
|
43
|
+
function p() {
|
|
44
|
+
c.value = !0, m.value = !1;
|
|
45
|
+
}
|
|
46
|
+
async function z() {
|
|
47
|
+
if (!o(n).showCollapseButton) {
|
|
48
|
+
p();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
await H();
|
|
52
|
+
const e = D["wrapper-ref"];
|
|
53
|
+
if (!e) {
|
|
54
|
+
p();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const t = Array.from(e.children);
|
|
58
|
+
if (t.length <= 1) {
|
|
59
|
+
p();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
let a = !1;
|
|
63
|
+
const s = /* @__PURE__ */ new Set();
|
|
64
|
+
if (c.value) {
|
|
65
|
+
for (const r of t)
|
|
66
|
+
if (r.getBoundingClientRect().top === 0) {
|
|
67
|
+
a = !0;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
a ? m.value = !0 : p();
|
|
71
|
+
} else {
|
|
72
|
+
for (const r of t) {
|
|
73
|
+
const y = r.getBoundingClientRect();
|
|
74
|
+
y.top !== 0 && s.add(y.top);
|
|
75
|
+
}
|
|
76
|
+
s.size === 1 ? p() : m.value = !0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
M(
|
|
80
|
+
() => c.value,
|
|
81
|
+
() => {
|
|
82
|
+
o(n).collapseTriggerResize && U();
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
const N = d(() => {
|
|
86
|
+
const e = o(n), t = e.actionLayout || "rowEnd", a = e.actionPosition || "right", s = [
|
|
87
|
+
"flex",
|
|
88
|
+
"items-center",
|
|
89
|
+
"gap-3",
|
|
90
|
+
e.compact ? "pb-[8px]" : "pb-(--form-valid-error-nocompact-padding-bottom)",
|
|
91
|
+
e.layout === "vertical" ? "self-end" : "self-center",
|
|
92
|
+
e.layout === "inline" ? "" : "w-full",
|
|
93
|
+
e.actionWrapperClass
|
|
94
|
+
];
|
|
95
|
+
switch (t) {
|
|
96
|
+
case "newLine": {
|
|
97
|
+
s.push("col-span-full");
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case "rowEnd": {
|
|
101
|
+
s.push("col-[-2/-1]");
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
switch (a) {
|
|
106
|
+
case "center": {
|
|
107
|
+
s.push("justify-center");
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
case "left": {
|
|
111
|
+
s.push("justify-start");
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
default: {
|
|
115
|
+
s.push("justify-end");
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return s.join(" ");
|
|
120
|
+
});
|
|
121
|
+
return W(() => {
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
o(n).showCollapseButton && z();
|
|
124
|
+
}, 200);
|
|
125
|
+
}), $({
|
|
126
|
+
handleReset: P,
|
|
127
|
+
handleSubmit: w
|
|
128
|
+
}), (e, t) => (l(), C("div", {
|
|
129
|
+
class: I(o(q)(N.value))
|
|
130
|
+
}, [
|
|
131
|
+
o(n).actionButtonsReverse ? (l(), C(x, { key: 0 }, [
|
|
132
|
+
f(e.$slots, "submit-before"),
|
|
133
|
+
i.value.show ? (l(), v(b(o(V)), g({ key: 0 }, i.value, {
|
|
134
|
+
class: o(A),
|
|
135
|
+
type: "primary",
|
|
136
|
+
onClick: w
|
|
137
|
+
}), {
|
|
138
|
+
default: k(() => [
|
|
139
|
+
B(R(i.value.content), 1)
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 16, ["class"])) : u("", !0)
|
|
143
|
+
], 64)) : u("", !0),
|
|
144
|
+
f(e.$slots, "reset-before"),
|
|
145
|
+
h.value.show ? (l(), v(b(o(V)), g({ key: 1 }, h.value, { onClick: P }), {
|
|
146
|
+
default: k(() => [
|
|
147
|
+
B(R(h.value.content), 1)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 16)) : u("", !0),
|
|
151
|
+
o(n).actionButtonsReverse ? u("", !0) : (l(), C(x, { key: 2 }, [
|
|
152
|
+
f(e.$slots, "submit-before"),
|
|
153
|
+
i.value.show ? (l(), v(b(o(V)), g({
|
|
154
|
+
key: 0,
|
|
155
|
+
type: "primary",
|
|
156
|
+
class: o(A)
|
|
157
|
+
}, i.value, { onClick: w }), {
|
|
158
|
+
default: k(() => [
|
|
159
|
+
B(R(i.value.content), 1)
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 16, ["class"])) : u("", !0)
|
|
163
|
+
], 64)),
|
|
164
|
+
f(e.$slots, "expand-before"),
|
|
165
|
+
T.value ? (l(), v(K, {
|
|
166
|
+
key: 3,
|
|
167
|
+
"model-value": c.value,
|
|
168
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => c.value = a),
|
|
169
|
+
class: "ml-[-0.3em]"
|
|
170
|
+
}, null, 8, ["model-value"])) : u("", !0),
|
|
171
|
+
f(e.$slots, "expand-after")
|
|
172
|
+
], 2));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
export {
|
|
176
|
+
ne as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineComponent as g, useAttrs as C, useSlots as h, useTemplateRef as k, computed as s, createBlock as w, openBlock as y, unref as r, mergeProps as P, createSlots as T, renderList as A, withCtx as B, renderSlot as E, normalizeProps as I, guardReactiveProps as V } from "vue";
|
|
2
|
+
import { ElInput as F } from "element-plus";
|
|
3
|
+
const D = /* @__PURE__ */ g({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "FormElInput",
|
|
6
|
+
props: {
|
|
7
|
+
form: {}
|
|
8
|
+
},
|
|
9
|
+
setup(L, { expose: a }) {
|
|
10
|
+
const u = C(), l = h(), t = k("inputRef"), i = s(() => {
|
|
11
|
+
var e;
|
|
12
|
+
return (e = t.value) == null ? void 0 : e.input;
|
|
13
|
+
}), c = s(() => {
|
|
14
|
+
var e;
|
|
15
|
+
return (e = t.value) == null ? void 0 : e.textarea;
|
|
16
|
+
}), p = s(() => {
|
|
17
|
+
var e;
|
|
18
|
+
return (e = t.value) == null ? void 0 : e.ref;
|
|
19
|
+
}), f = s(() => {
|
|
20
|
+
var e;
|
|
21
|
+
return (e = t.value) == null ? void 0 : e.textareaStyle;
|
|
22
|
+
}), m = s(() => {
|
|
23
|
+
var e;
|
|
24
|
+
return (e = t.value) == null ? void 0 : e.autosize;
|
|
25
|
+
}), v = s(() => {
|
|
26
|
+
var e;
|
|
27
|
+
return (e = t.value) == null ? void 0 : e.isComposing;
|
|
28
|
+
}), _ = s(() => {
|
|
29
|
+
var e;
|
|
30
|
+
return (e = t.value) == null ? void 0 : e.passwordVisible;
|
|
31
|
+
});
|
|
32
|
+
function x() {
|
|
33
|
+
var e;
|
|
34
|
+
(e = t.value) == null || e.focus();
|
|
35
|
+
}
|
|
36
|
+
function d() {
|
|
37
|
+
var e;
|
|
38
|
+
(e = t.value) == null || e.blur();
|
|
39
|
+
}
|
|
40
|
+
function z() {
|
|
41
|
+
var e;
|
|
42
|
+
(e = t.value) == null || e.select();
|
|
43
|
+
}
|
|
44
|
+
function R(e) {
|
|
45
|
+
var o;
|
|
46
|
+
(o = t.value) == null || o.clear(e);
|
|
47
|
+
}
|
|
48
|
+
function S() {
|
|
49
|
+
var e;
|
|
50
|
+
(e = t.value) == null || e.resizeTextarea();
|
|
51
|
+
}
|
|
52
|
+
return a({
|
|
53
|
+
input: i,
|
|
54
|
+
textarea: c,
|
|
55
|
+
ref: p,
|
|
56
|
+
textareaStyle: f,
|
|
57
|
+
autosize: m,
|
|
58
|
+
isComposing: v,
|
|
59
|
+
passwordVisible: _,
|
|
60
|
+
focus: x,
|
|
61
|
+
blur: d,
|
|
62
|
+
select: z,
|
|
63
|
+
clear: R,
|
|
64
|
+
resizeTextarea: S
|
|
65
|
+
}), (e, o) => (y(), w(r(F), P({
|
|
66
|
+
ref_key: "inputRef",
|
|
67
|
+
ref: t
|
|
68
|
+
}, r(u)), T({ _: 2 }, [
|
|
69
|
+
A(r(l), ($, n) => ({
|
|
70
|
+
name: n,
|
|
71
|
+
fn: B((b) => [
|
|
72
|
+
E(e.$slots, n, I(V(b || {})))
|
|
73
|
+
])
|
|
74
|
+
}))
|
|
75
|
+
]), 1040));
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export {
|
|
79
|
+
D as default
|
|
80
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as g, Comment as i, mergeProps as d, cloneVNode as x, Fragment as P } from "vue";
|
|
2
|
+
function l(n) {
|
|
3
|
+
return n ? n.flatMap((r) => r.type === P ? l(r.children) : [r]) : [];
|
|
4
|
+
}
|
|
5
|
+
const y = g({
|
|
6
|
+
name: "PrimitiveSlot",
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
setup(n, { attrs: r, slots: f }) {
|
|
9
|
+
return () => {
|
|
10
|
+
var a, c;
|
|
11
|
+
if (!f.default) return null;
|
|
12
|
+
const p = l(f.default()), o = p.findIndex((s) => s.type !== i);
|
|
13
|
+
if (o === -1) return p;
|
|
14
|
+
const e = p[o];
|
|
15
|
+
(a = e == null ? void 0 : e.props) == null || delete a.ref;
|
|
16
|
+
const u = e != null && e.props ? d(r, e == null ? void 0 : e.props) : r;
|
|
17
|
+
r.class && ((c = e == null ? void 0 : e.props) != null && c.class) && delete e.props.class;
|
|
18
|
+
const t = x(e, u);
|
|
19
|
+
for (const s in u)
|
|
20
|
+
s.startsWith("on") && (t.props || (t.props = {}), t.props[s] = u[s]);
|
|
21
|
+
return p.length === 1 ? t : (p[o] = t, p);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
y as Slot,
|
|
27
|
+
l as renderSlotFragments
|
|
28
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ElColorPicker as d, ElCascader as f, ElUpload as u, ElTreeSelect as O, ElTimePicker as N, ElSwitch as P, ElSelectV2 as M, ElSelect as b, ElRadioGroup as C, ElRadio as _, ElInputNumber as T, ElDatePicker as k, ElCheckboxGroup as S, ElCheckboxButton as h, ElCheckbox as A } from "element-plus";
|
|
2
|
+
import { TtSelect as L } from "../../tt-select/index.js";
|
|
3
|
+
import { TtPanelSelect as R } from "../../tt-panel-select/index.js";
|
|
4
|
+
import { TtUpload as y } from "../../tt-upload/index.js";
|
|
5
|
+
import { TtApiComponent as D } from "../../tt-api-component/index.js";
|
|
6
|
+
import { globalShareState as F } from "./shared/global-state.js";
|
|
7
|
+
import { defineRule as I } from "vee-validate";
|
|
8
|
+
import U from "./components/FormElInput.vue.js";
|
|
9
|
+
const p = "modelValue", x = {}, V = {
|
|
10
|
+
TtSelect: L,
|
|
11
|
+
TtUpload: y,
|
|
12
|
+
ElCheckbox: A,
|
|
13
|
+
ElCheckboxButton: h,
|
|
14
|
+
ElCheckboxGroup: S,
|
|
15
|
+
ElDatePicker: k,
|
|
16
|
+
ElInput: U,
|
|
17
|
+
ElInputNumber: T,
|
|
18
|
+
ElRadio: _,
|
|
19
|
+
ElRadioGroup: C,
|
|
20
|
+
ElSelect: b,
|
|
21
|
+
ElSelectV2: M,
|
|
22
|
+
ElSwitch: P,
|
|
23
|
+
ElTimePicker: N,
|
|
24
|
+
ElTreeSelect: O,
|
|
25
|
+
ElUpload: u,
|
|
26
|
+
ElCascader: f,
|
|
27
|
+
ElColorPicker: d,
|
|
28
|
+
TtApiComponent: D,
|
|
29
|
+
TtPanelSelect: R
|
|
30
|
+
}, c = {
|
|
31
|
+
ElUpload: "fileList"
|
|
32
|
+
};
|
|
33
|
+
function H(s) {
|
|
34
|
+
const { config: e, defineRules: l } = s, {
|
|
35
|
+
disabledOnChangeListener: a = !0,
|
|
36
|
+
disabledOnInputListener: i = !0,
|
|
37
|
+
emptyStateValue: E = void 0
|
|
38
|
+
} = e || {};
|
|
39
|
+
if (Object.assign(x, {
|
|
40
|
+
disabledOnChangeListener: a,
|
|
41
|
+
disabledOnInputListener: i,
|
|
42
|
+
emptyStateValue: E
|
|
43
|
+
}), l)
|
|
44
|
+
for (const o of Object.keys(l))
|
|
45
|
+
I(o, l[o]);
|
|
46
|
+
const n = (e == null ? void 0 : e.baseModelPropName) ?? p, r = e == null ? void 0 : e.modelPropNameMap, m = F.getComponents();
|
|
47
|
+
for (const o of Object.keys(m)) {
|
|
48
|
+
const t = o;
|
|
49
|
+
V[t] = m[o], n !== p && (c[t] = n), r && r[t] && (c[t] = r[t]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
c as COMPONENT_BIND_EVENT_MAP,
|
|
54
|
+
V as COMPONENT_MAP,
|
|
55
|
+
x as DEFAULT_FORM_COMMON_CONFIG,
|
|
56
|
+
H as setupForm
|
|
57
|
+
};
|