@dazhicheng/ui 1.5.199 → 1.5.201
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/action_more.svg.js +4 -0
- package/dist/assets/svg/close.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.vue2.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 +156 -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 +65 -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 +346 -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 +102 -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 +197 -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 +278 -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 +149 -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 +30 -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 +178 -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 +33 -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 +317 -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 +233 -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 +305 -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/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 +3 -1
- package/dist/index-NG5FNCLD.js +0 -3430
- package/dist/index.modern-4Cf3dcJP.js +0 -3069
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as n, createElementBlock as a, openBlock as s, normalizeClass as o, unref as l, createElementVNode as i, toDisplayString as p } from "vue";
|
|
2
|
+
import { propTypes as m, useDesign as c } from "@dazhicheng/hooks";
|
|
3
|
+
const _ = /* @__PURE__ */ n({
|
|
4
|
+
name: "DrawerHeader",
|
|
5
|
+
__name: "DrawerHeader",
|
|
6
|
+
props: {
|
|
7
|
+
/** 标题 */
|
|
8
|
+
title: m.string
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
const { prefixCls: r } = c("drawer-header");
|
|
12
|
+
return (t, d) => (s(), a("div", {
|
|
13
|
+
class: o(l(r))
|
|
14
|
+
}, [
|
|
15
|
+
i("span", null, p(t.$slots.title ? "" : e.title), 1)
|
|
16
|
+
], 2));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
_ as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { useStore as h } from "@tanstack/vue-store";
|
|
2
|
+
import { reactive as x, ref as R, defineComponent as p, provide as _, nextTick as y, h as u, inject as O, onMounted as E, watch as S, render as C } from "vue";
|
|
3
|
+
import { RouterView as g } from "vue-router";
|
|
4
|
+
import v from "../RenderDrawer.vue.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { DrawerApi as T } from "../utils/drawer-api.js";
|
|
7
|
+
const P = Symbol("TT_DRAWER_INJECT"), k = {};
|
|
8
|
+
function F(o = {}, c = P) {
|
|
9
|
+
var d;
|
|
10
|
+
const { connectedComponent: a } = o;
|
|
11
|
+
if (a) {
|
|
12
|
+
const r = x({}), n = R(!0);
|
|
13
|
+
return [p(
|
|
14
|
+
(m, { attrs: D, slots: A }) => (_(c, {
|
|
15
|
+
extendApi(b) {
|
|
16
|
+
Object.setPrototypeOf(r, b);
|
|
17
|
+
},
|
|
18
|
+
options: o,
|
|
19
|
+
async reCreateDrawer() {
|
|
20
|
+
n.value = !1, await y(), n.value = !0;
|
|
21
|
+
}
|
|
22
|
+
}), V(r, {
|
|
23
|
+
...m,
|
|
24
|
+
...D,
|
|
25
|
+
...A
|
|
26
|
+
}), () => u(n.value ? a : "div", { ...m, ...D }, A)),
|
|
27
|
+
{
|
|
28
|
+
name: "TtParentDrawer",
|
|
29
|
+
inheritAttrs: !1
|
|
30
|
+
}
|
|
31
|
+
), r];
|
|
32
|
+
}
|
|
33
|
+
const t = O(c, {}), e = {
|
|
34
|
+
...k,
|
|
35
|
+
...t.options,
|
|
36
|
+
...o
|
|
37
|
+
};
|
|
38
|
+
e.onVisibleChange = (r) => {
|
|
39
|
+
var n, i, m;
|
|
40
|
+
(n = o.onVisibleChange) == null || n.call(o, r), (m = (i = t.options) == null ? void 0 : i.onVisibleChange) == null || m.call(i, r);
|
|
41
|
+
};
|
|
42
|
+
const s = e.onClosed;
|
|
43
|
+
e.onClosed = () => {
|
|
44
|
+
var r;
|
|
45
|
+
s == null || s(), e.destroyOnClose && ((r = t.reCreateDrawer) == null || r.call(t));
|
|
46
|
+
};
|
|
47
|
+
const f = new T(e), w = f;
|
|
48
|
+
w.useStore = (r) => h(f.store, r);
|
|
49
|
+
const l = p(
|
|
50
|
+
(r, { attrs: n, slots: i }) => () => u(
|
|
51
|
+
v,
|
|
52
|
+
{
|
|
53
|
+
...r,
|
|
54
|
+
...n,
|
|
55
|
+
drawerApi: w
|
|
56
|
+
},
|
|
57
|
+
i
|
|
58
|
+
),
|
|
59
|
+
{
|
|
60
|
+
name: "TtDrawer",
|
|
61
|
+
inheritAttrs: !1
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
return (d = t.extendApi) == null || d.call(t, w), [l, f];
|
|
65
|
+
}
|
|
66
|
+
function K(o, c, a) {
|
|
67
|
+
const t = new T(a), e = t;
|
|
68
|
+
e.useStore = (d) => h(t.store, d);
|
|
69
|
+
const s = document.createElement("div");
|
|
70
|
+
document.body.appendChild(s);
|
|
71
|
+
const f = p(
|
|
72
|
+
(d, { slots: r }) => (E(() => {
|
|
73
|
+
a && e.setDrawerProps(a), e.openDrawer();
|
|
74
|
+
}), S(
|
|
75
|
+
() => {
|
|
76
|
+
var n;
|
|
77
|
+
return (n = e.getVisible) == null ? void 0 : n.value;
|
|
78
|
+
},
|
|
79
|
+
(n) => {
|
|
80
|
+
n || (C(null, s), s.remove());
|
|
81
|
+
}
|
|
82
|
+
), () => u(
|
|
83
|
+
v,
|
|
84
|
+
{
|
|
85
|
+
...d,
|
|
86
|
+
drawerApi: e
|
|
87
|
+
},
|
|
88
|
+
r
|
|
89
|
+
)),
|
|
90
|
+
{
|
|
91
|
+
name: "TtDrawer",
|
|
92
|
+
inheritAttrs: !1
|
|
93
|
+
}
|
|
94
|
+
), w = u(c, {}), l = u(
|
|
95
|
+
g,
|
|
96
|
+
{},
|
|
97
|
+
() => u(
|
|
98
|
+
f,
|
|
99
|
+
{
|
|
100
|
+
...a
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
default: () => w
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
);
|
|
107
|
+
return l.appContext = o._context, C(l, s), e;
|
|
108
|
+
}
|
|
109
|
+
async function V(o, c) {
|
|
110
|
+
var e;
|
|
111
|
+
if (!c || Object.keys(c).length === 0)
|
|
112
|
+
return;
|
|
113
|
+
await y();
|
|
114
|
+
const a = (e = o == null ? void 0 : o.store) == null ? void 0 : e.state;
|
|
115
|
+
if (!a)
|
|
116
|
+
return;
|
|
117
|
+
const t = new Set(Object.keys(a));
|
|
118
|
+
for (const s of Object.keys(c))
|
|
119
|
+
t.has(s) && ["class"].includes(s);
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
K as showTtDrawer,
|
|
123
|
+
F as useDrawerRender
|
|
124
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ref as l, defineComponent as D, h as f, watch as M } from "vue";
|
|
2
|
+
function Y(d, p, v) {
|
|
3
|
+
const o = l(!1), u = l(!1), a = l(0), n = l(0), e = l(), s = l();
|
|
4
|
+
function m(t) {
|
|
5
|
+
t.stopPropagation(), t.preventDefault(), o.value = !0;
|
|
6
|
+
const { clientX: i } = t;
|
|
7
|
+
if (!e.value) return;
|
|
8
|
+
const b = e.value.clientWidth, x = e.value.style.transition;
|
|
9
|
+
e.value.style.transition = "none", document.onmousemove = z, document.onmouseup = function() {
|
|
10
|
+
document.onmousemove = null, document.onmouseup = null, u.value = !1, o.value = !1, e.value && (e.value.style.transition = x);
|
|
11
|
+
};
|
|
12
|
+
function z(r) {
|
|
13
|
+
r.stopPropagation(), r.preventDefault();
|
|
14
|
+
const y = r.clientX - i;
|
|
15
|
+
n.value = b - y, n.value <= 20 ? n.value = 20 : n.value >= window.innerWidth && (n.value = window.innerWidth), a.value = r.clientY > window.innerHeight ? window.innerHeight : r.clientY, requestAnimationFrame(() => {
|
|
16
|
+
if (c(), o.value)
|
|
17
|
+
if (v)
|
|
18
|
+
v({
|
|
19
|
+
size: `${n.value}px`
|
|
20
|
+
});
|
|
21
|
+
else {
|
|
22
|
+
if (!e.value) return;
|
|
23
|
+
e.value.style.width = `${n.value}px`;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function w(t) {
|
|
29
|
+
u.value = !0, a.value = t.clientY, !o.value && (document.onmousemove = function(i) {
|
|
30
|
+
a.value = i.clientY > window.innerHeight ? window.innerHeight : i.clientY, requestAnimationFrame(() => {
|
|
31
|
+
c();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function h(t) {
|
|
36
|
+
o.value || (u.value = !1, document.onmousemove = null);
|
|
37
|
+
}
|
|
38
|
+
function c() {
|
|
39
|
+
s.value && (s.value.textContent = `width: ${n.value}px`);
|
|
40
|
+
}
|
|
41
|
+
const g = D(
|
|
42
|
+
() => () => f(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
class: "drag-line",
|
|
46
|
+
onMouseover: w,
|
|
47
|
+
onMouseleave: h,
|
|
48
|
+
onMousedown: m,
|
|
49
|
+
style: {
|
|
50
|
+
position: "absolute",
|
|
51
|
+
top: "0",
|
|
52
|
+
left: "0",
|
|
53
|
+
width: "10px",
|
|
54
|
+
height: "100%",
|
|
55
|
+
cursor: "w-resize",
|
|
56
|
+
borderLeft: u.value ? "2px solid #2779ff" : "none"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
[
|
|
60
|
+
f("div", {
|
|
61
|
+
class: "drag-line-tip",
|
|
62
|
+
style: {
|
|
63
|
+
position: "absolute",
|
|
64
|
+
top: `${a.value < 0 ? 0 : a.value}px`,
|
|
65
|
+
left: "0px",
|
|
66
|
+
background: "#2779ff",
|
|
67
|
+
color: "#fff",
|
|
68
|
+
display: u.value ? "block" : "none",
|
|
69
|
+
whiteSpace: "nowrap",
|
|
70
|
+
zIndex: "9999",
|
|
71
|
+
padding: "4px 5px"
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
),
|
|
76
|
+
{
|
|
77
|
+
inheritAttrs: !1,
|
|
78
|
+
name: "ResizableBar"
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
return M(
|
|
82
|
+
() => p.value,
|
|
83
|
+
(t) => {
|
|
84
|
+
t && setTimeout(() => {
|
|
85
|
+
var i;
|
|
86
|
+
e.value = document.querySelector(`#${d}`), e.value && (n.value = e.value.clientWidth, s.value = (i = e.value) == null ? void 0 : i.querySelector(".drag-line-tip"));
|
|
87
|
+
}, 200);
|
|
88
|
+
}
|
|
89
|
+
), [
|
|
90
|
+
g,
|
|
91
|
+
{
|
|
92
|
+
isDragging: o
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
Y as useDrawerResizable
|
|
98
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { inject as n } from "vue";
|
|
2
|
+
import { showTtDrawer as s } from "./hooks/useDrawerRender.js";
|
|
3
|
+
const o = Symbol("SHOW_DRAWER");
|
|
4
|
+
function i(r) {
|
|
5
|
+
const e = (t, w) => s(r, t, w);
|
|
6
|
+
r.provide(o, e);
|
|
7
|
+
}
|
|
8
|
+
function u() {
|
|
9
|
+
const r = n(o);
|
|
10
|
+
if (!r)
|
|
11
|
+
throw new Error("[TtDrawer]: useShowDrawer() 需要先调用 setupDrawer(app) 进行注册");
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as setupDrawer,
|
|
16
|
+
u as useShowDrawer
|
|
17
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { propTypes as o } from "@dazhicheng/hooks";
|
|
2
|
+
import { GlobalConfig as e } from "@dazhicheng-ui/hooks/useSetup";
|
|
3
|
+
const t = {
|
|
4
|
+
/** 确定抽屉的loading */
|
|
5
|
+
confirmLoading: o.bool.def(!1),
|
|
6
|
+
/** 是否显示取消按钮 */
|
|
7
|
+
showCancelBtn: o.bool.def(!0),
|
|
8
|
+
/** 取消按钮的props */
|
|
9
|
+
cancelButtonProps: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: {}
|
|
12
|
+
},
|
|
13
|
+
/** 取消按钮的文本 */
|
|
14
|
+
cancelText: o.string.def("取消"),
|
|
15
|
+
/** 是否显示确定按钮 */
|
|
16
|
+
showOkBtn: o.bool.def(!0),
|
|
17
|
+
/** 确定按钮的props */
|
|
18
|
+
okButtonProps: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: {
|
|
21
|
+
type: "primary"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
/** 确定按钮的文本 */
|
|
25
|
+
okText: o.string.def("确认"),
|
|
26
|
+
/** 确定按钮的类型 */
|
|
27
|
+
okType: o.string.def("primary"),
|
|
28
|
+
/** 是否显示footer */
|
|
29
|
+
showFooter: o.bool,
|
|
30
|
+
/** footer高度 */
|
|
31
|
+
footerHeight: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: 44
|
|
34
|
+
},
|
|
35
|
+
height: o.string.def("56px"),
|
|
36
|
+
size: o.string.def("30%")
|
|
37
|
+
}, r = {
|
|
38
|
+
/** class */
|
|
39
|
+
class: o.string.def(""),
|
|
40
|
+
/** 标题 */
|
|
41
|
+
title: o.string.def(""),
|
|
42
|
+
/** 测试标识 */
|
|
43
|
+
testId: o.string,
|
|
44
|
+
/** loading文本 */
|
|
45
|
+
loadingText: o.string,
|
|
46
|
+
/** 显示 */
|
|
47
|
+
visible: o.bool.def(!1),
|
|
48
|
+
/** 显示loading */
|
|
49
|
+
loading: o.bool.def(!1),
|
|
50
|
+
/** 是否点击遮罩关闭弹窗 */
|
|
51
|
+
maskClosable: o.bool.def(!0),
|
|
52
|
+
/** 是否关闭销毁组件 */
|
|
53
|
+
destroyOnClose: { type: Boolean },
|
|
54
|
+
/** 取消前事件 */
|
|
55
|
+
closeFunc: {
|
|
56
|
+
type: Function
|
|
57
|
+
},
|
|
58
|
+
/** 取消前是否显示确认弹窗 */
|
|
59
|
+
showConfirm: o.bool.def(!1),
|
|
60
|
+
/** 确认弹窗文本内容 */
|
|
61
|
+
confirmContent: o.string.def(e.confirmContent || ""),
|
|
62
|
+
/** 是否显示modal */
|
|
63
|
+
modal: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: () => e.showMask
|
|
66
|
+
},
|
|
67
|
+
...t
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
r as basicProps,
|
|
71
|
+
t as footerProps
|
|
72
|
+
};
|
|
@@ -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 "@dazhicheng-ui/hooks/useSetup";
|
|
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 "@dazhicheng-ui/assets/img/empty_images/no_data.png";
|
|
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,65 @@
|
|
|
1
|
+
import { isEmpty as o } from "@dazhicheng/utils";
|
|
2
|
+
import { setupForm as i } from "./src/config.js";
|
|
3
|
+
import { COMPONENT_MAP as X } 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 "@dazhicheng-ui/components/tt-button";
|
|
17
|
+
import "@dazhicheng-ui/assets/svg/arrowLineDown.svg?raw";
|
|
18
|
+
import "@dazhicheng-ui/assets/svg/arrowUp.svg?raw";
|
|
19
|
+
import "@dazhicheng-ui/components/tt-icon";
|
|
20
|
+
/* empty css */
|
|
21
|
+
/* empty css */
|
|
22
|
+
import "./src/components/Slot.js";
|
|
23
|
+
import "@dazhicheng-ui/components/tt-form-item-error-tooltip";
|
|
24
|
+
import "@dazhicheng-ui/assets/img/FormItemWarning.jpeg?inline";
|
|
25
|
+
import "element-plus";
|
|
26
|
+
/* empty css */
|
|
27
|
+
import "./src/form/RenderContent.vue.js";
|
|
28
|
+
import "@vee-validate/zod";
|
|
29
|
+
import "@dazhicheng-ui/assets/svg/help.svg?raw";
|
|
30
|
+
import "@dazhicheng-ui/components/tt-text";
|
|
31
|
+
import "./src/form-render/FormFieldContact.js";
|
|
32
|
+
/* empty css */
|
|
33
|
+
/* empty css */
|
|
34
|
+
import "@dazhicheng-ui/components/tt-nav-anchor";
|
|
35
|
+
import "@dazhicheng-ui/assets/svg/arrowDown.svg?raw";
|
|
36
|
+
import "@dazhicheng-ui/assets/svg/arrowSUp.svg?raw";
|
|
37
|
+
/* empty css */
|
|
38
|
+
/* empty css */
|
|
39
|
+
function L(t, m) {
|
|
40
|
+
i({
|
|
41
|
+
config: {
|
|
42
|
+
// vue组件库默认都是 modelValue
|
|
43
|
+
baseModelPropName: "modelValue",
|
|
44
|
+
// 一些组件是 v-model:checked 或者 v-model:fileList
|
|
45
|
+
modelPropNameMap: {
|
|
46
|
+
...m
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defineRules: {
|
|
50
|
+
required: (r, e, n) => o(r) || typeof r == "string" && r.trim().length === 0 ? "请输入" : !0,
|
|
51
|
+
// 选择项目必填国际化适配
|
|
52
|
+
selectRequired: (r) => o(r) ? "请选择" : !0,
|
|
53
|
+
...t
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function Q(t) {
|
|
58
|
+
p.setComponents({ ...t });
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
X as COMPONENT_MAP,
|
|
62
|
+
Q as addComponent,
|
|
63
|
+
L as setConfig,
|
|
64
|
+
M as z
|
|
65
|
+
};
|
|
@@ -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 "@dazhicheng-ui/assets/svg/arrowLineDown.svg?raw";
|
|
4
|
+
import w from "@dazhicheng-ui/assets/svg/arrowUp.svg?raw";
|
|
5
|
+
import _ from "@dazhicheng-ui/components/tt-icon";
|
|
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
|
+
};
|