@dazhicheng/ui 1.5.202 → 1.5.204
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/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +24 -0
- package/dist/_virtual/aes.js +4 -0
- package/dist/_virtual/cipher-core.js +4 -0
- package/dist/_virtual/core.js +4 -0
- package/dist/_virtual/enc-base64.js +4 -0
- package/dist/_virtual/enc-utf8.js +4 -0
- package/dist/_virtual/evpkdf.js +4 -0
- package/dist/_virtual/hmac.js +4 -0
- package/dist/_virtual/md5.js +4 -0
- package/dist/_virtual/mode-ecb.js +4 -0
- package/dist/_virtual/pad-pkcs7.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/components/tt-api-component/index.js +17 -4
- package/dist/components/tt-api-component/index.vue2.js +24 -13
- package/dist/components/tt-area/TtArea.vue3.js +24 -13
- package/dist/components/tt-button/index.js +18 -5
- package/dist/components/tt-button/index.vue2.js +27 -16
- package/dist/components/tt-checkbox/index.js +17 -4
- package/dist/components/tt-checkbox/index.vue.js +38 -28
- package/dist/components/tt-drawer/index.js +17 -7
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
- package/dist/components/tt-drawer/src/props.js +22 -9
- package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
- package/dist/components/tt-empty/index.js +28 -18
- package/dist/components/tt-form/index.js +22 -14
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
- package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
- package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
- package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
- package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
- package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
- package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
- package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
- package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
- package/dist/components/tt-form/src/form-render/helper.js +29 -16
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
- package/dist/components/tt-form/src/formApi.js +59 -48
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
- package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
- package/dist/components/tt-form/src/index.vue2.js +53 -45
- package/dist/components/tt-form/src/useFormContext.js +74 -62
- package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
- package/dist/components/tt-icon/index.js +20 -7
- package/dist/components/tt-image/index.js +19 -6
- package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
- package/dist/components/tt-loading/index.js +16 -4
- package/dist/components/tt-loading/src/directive.js +34 -22
- package/dist/components/tt-log/index.js +17 -4
- package/dist/components/tt-log/index.vue.js +21 -8
- package/dist/components/tt-modal/index.js +16 -5
- package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
- package/dist/components/tt-modal/src/props.js +22 -9
- package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
- package/dist/components/tt-modal-form/index.vue.js +44 -36
- package/dist/components/tt-nav-anchor/index.js +17 -4
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
- package/dist/components/tt-panel-select/index.js +17 -4
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
- package/dist/components/tt-panel-select/src/index.vue.js +35 -24
- package/dist/components/tt-select/index.js +17 -4
- package/dist/components/tt-select/src/Select.vue.js +79 -68
- package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
- package/dist/components/tt-select/src/components/Table.vue.js +86 -76
- package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
- package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
- package/dist/components/tt-table/index.js +19 -12
- package/dist/components/tt-table/src/Table.vue.js +82 -71
- package/dist/components/tt-table/src/TableForm.vue.js +77 -65
- package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
- package/dist/components/tt-table/src/components/TableButtons.js +73 -60
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
- package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
- package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
- package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
- package/dist/components/tt-table/src/props.js +55 -42
- package/dist/components/tt-table/src/utils/table-api.js +33 -22
- package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
- package/dist/components/tt-text/index.js +17 -4
- package/dist/components/tt-upload/index.js +19 -6
- package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
- package/dist/directives/disabled-tip/index.js +37 -26
- package/dist/hooks/useFormSchemasLink.js +90 -79
- package/dist/hooks/useScreenshotOss.js +49 -35
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
- package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
- package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
- package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
- package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
- package/dist/packages/hooks/src/propTypes.js +17 -0
- package/dist/packages/hooks/src/tools.js +6 -0
- package/dist/packages/hooks/src/useDebounce.js +32 -0
- package/dist/packages/hooks/src/useDesign.js +12 -0
- package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
- package/dist/packages/hooks/src/useIsScroll.js +12 -0
- package/dist/packages/hooks/src/usePriorityValue.js +45 -0
- package/dist/packages/utils/src/calc.js +14 -0
- package/dist/packages/utils/src/check.js +10 -0
- package/dist/packages/utils/src/install.js +11 -0
- package/dist/packages/utils/src/is.js +64 -0
- package/dist/packages/utils/src/merge.js +13 -0
- package/dist/packages/utils/src/stateHandler.js +33 -0
- package/dist/packages/utils/src/string.js +6 -0
- package/dist/packages/utils/src/testid-helper.js +14 -0
- package/dist/packages/utils/src/tool.js +181 -0
- package/dist/plugins/default/renderCellContent.js +39 -28
- package/dist/plugins/vxeTable/switchStatus.js +37 -26
- package/package.json +3 -3
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TtIcon as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { dialogProps as E, ElDialog as
|
|
1
|
+
import { defineComponent as ko, ref as x, useAttrs as vo, useSlots as To, getCurrentInstance as Co, computed as c, unref as e, watch as R, reactive as yo, provide as Bo, nextTick as Po, onMounted as $o, onUnmounted as Io, withDirectives as Oo, createElementBlock as Mo, openBlock as wo, createVNode as k, mergeProps as j, h as So, createSlots as y, withCtx as p, normalizeClass as Fo, renderSlot as u, renderList as B, normalizeProps as P, guardReactiveProps as $, createElementVNode as Do } from "vue";
|
|
2
|
+
import { TtIcon as Vo } from "../../tt-icon/index.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
4
|
+
import { useDesign as zo } from "../../../packages/hooks/src/useDesign.js";
|
|
5
|
+
import { usePriorityValues as Ao, getPriorityValues as Lo } from "../../../packages/hooks/src/usePriorityValue.js";
|
|
6
|
+
import "axios";
|
|
7
|
+
import { dialogProps as E, ElDialog as _o } from "element-plus";
|
|
8
|
+
import "dayjs";
|
|
9
|
+
import { generateTestId as I, toKebabCase as xo } from "../../../packages/utils/src/testid-helper.js";
|
|
10
|
+
import "xe-utils";
|
|
11
|
+
import "dayjs/plugin/utc";
|
|
12
|
+
import "dayjs/plugin/timezone";
|
|
13
|
+
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
14
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
15
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
16
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
17
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
8
18
|
import { omit as H, pick as O } from "lodash-es";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
|
|
19
|
+
import Ro from "../../../directives/dialog-resize/index.js";
|
|
20
|
+
import { useStore as jo } from "@tanstack/vue-store";
|
|
21
|
+
import Eo from "./components/ModalFooter.vue.js";
|
|
22
|
+
import Ho from "./components/ModalHeader.vue.js";
|
|
23
|
+
import Wo from "./components/ModalWrapper.vue.js";
|
|
24
|
+
import { basicProps as No } from "./props.js";
|
|
25
|
+
import { ModalApi as qo } from "./utils/modal-api.js";
|
|
26
|
+
import { pushModal as Ko, removeModal as W } from "./utils/modal-stack.js";
|
|
27
|
+
import Uo from "../../../assets/svg/close.svg.js";
|
|
28
|
+
const Go = ["aria-tt-id", "data-testid"], Jo = ["data-testid"], Be = /* @__PURE__ */ ko({
|
|
17
29
|
name: "TtModal",
|
|
18
30
|
__name: "RenderModal",
|
|
19
31
|
props: {
|
|
20
32
|
...E,
|
|
21
|
-
...
|
|
33
|
+
...No,
|
|
22
34
|
/** modalApi */
|
|
23
35
|
modalApi: {
|
|
24
36
|
type: Object,
|
|
@@ -28,22 +40,22 @@ const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE_
|
|
|
28
40
|
emits: ["visible-change", "register", "update:visible"],
|
|
29
41
|
setup(N, { expose: q, emit: K }) {
|
|
30
42
|
var L;
|
|
31
|
-
const n = N, v = K,
|
|
32
|
-
let
|
|
33
|
-
if (!
|
|
34
|
-
const
|
|
43
|
+
const n = N, v = K, m = x(), { prefixCls: U } = zo("modal"), d = vo(), G = To(), t = Co(), M = x(!1);
|
|
44
|
+
let i = n.modalApi;
|
|
45
|
+
if (!i) {
|
|
46
|
+
const o = n.okButtonProps ? {
|
|
35
47
|
...n.okButtonProps,
|
|
36
48
|
disabledTip: Array.isArray(n.okButtonProps.disabledTip) ? n.okButtonProps.disabledTip : n.okButtonProps.disabledTip ? [n.okButtonProps.disabledTip] : void 0
|
|
37
49
|
} : void 0, s = {
|
|
38
50
|
...n,
|
|
39
|
-
okButtonProps:
|
|
51
|
+
okButtonProps: o
|
|
40
52
|
};
|
|
41
|
-
|
|
42
|
-
const r =
|
|
43
|
-
return
|
|
53
|
+
i = new qo(s), i.useStore = (a) => {
|
|
54
|
+
const r = a ?? ((l) => l);
|
|
55
|
+
return jo(i.store, r);
|
|
44
56
|
};
|
|
45
57
|
}
|
|
46
|
-
const g = (L =
|
|
58
|
+
const g = (L = i.useStore) == null ? void 0 : L.call(i), {
|
|
47
59
|
visible: T,
|
|
48
60
|
title: w,
|
|
49
61
|
width: S,
|
|
@@ -54,230 +66,230 @@ const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE_
|
|
|
54
66
|
isBottom: D,
|
|
55
67
|
draggable: Y,
|
|
56
68
|
showCancelBtn: Z,
|
|
57
|
-
okText:
|
|
58
|
-
cancelText:
|
|
69
|
+
okText: oo,
|
|
70
|
+
cancelText: eo,
|
|
59
71
|
okButtonProps: b,
|
|
60
|
-
cancelButtonProps:
|
|
61
|
-
confirmLoading:
|
|
62
|
-
cancelLoading:
|
|
63
|
-
showOkBtn:
|
|
72
|
+
cancelButtonProps: to,
|
|
73
|
+
confirmLoading: so,
|
|
74
|
+
cancelLoading: ro,
|
|
75
|
+
showOkBtn: io,
|
|
64
76
|
loading: V,
|
|
65
|
-
height:
|
|
77
|
+
height: ao,
|
|
66
78
|
showFooter: z,
|
|
67
|
-
loadingTip:
|
|
68
|
-
...
|
|
69
|
-
} =
|
|
70
|
-
const
|
|
79
|
+
loadingTip: lo,
|
|
80
|
+
...no
|
|
81
|
+
} = Ao(n, g), po = c(() => {
|
|
82
|
+
const o = {
|
|
71
83
|
mini: "448px",
|
|
72
84
|
small: "592px",
|
|
73
85
|
medium: "876px"
|
|
74
86
|
};
|
|
75
|
-
return
|
|
76
|
-
}),
|
|
77
|
-
const
|
|
87
|
+
return e(S) ? e(S) : o[e(F)] ? o[e(F)] : "500px";
|
|
88
|
+
}), co = c(() => {
|
|
89
|
+
const o = Lo(no), s = H(d, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]);
|
|
78
90
|
return {
|
|
79
91
|
appendToBody: !0,
|
|
80
|
-
...O(
|
|
92
|
+
...O(o, Object.keys(E)),
|
|
81
93
|
...s,
|
|
82
|
-
modelValue:
|
|
83
|
-
width:
|
|
94
|
+
modelValue: e(T),
|
|
95
|
+
width: e(po),
|
|
84
96
|
destroyOnClose: !0,
|
|
85
97
|
closeOnClickModal: !1,
|
|
86
98
|
// 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
|
|
87
99
|
// 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
|
|
88
100
|
closeOnPressEscape: !1,
|
|
89
|
-
top:
|
|
101
|
+
top: e(X) ?? e(D) ? "40px" : "15vh",
|
|
90
102
|
fullscreen: !1,
|
|
91
103
|
draggable: !1,
|
|
92
|
-
modalClass: `${
|
|
104
|
+
modalClass: `${o.modalClass || ""} tt-id-${t == null ? void 0 : t.uid}`
|
|
93
105
|
};
|
|
94
|
-
}),
|
|
95
|
-
showCancelBtn:
|
|
96
|
-
okText:
|
|
97
|
-
cancelText:
|
|
98
|
-
okButtonProps:
|
|
99
|
-
cancelButtonProps:
|
|
100
|
-
confirmLoading:
|
|
101
|
-
cancelLoading:
|
|
102
|
-
showOkBtn:
|
|
103
|
-
})), A =
|
|
106
|
+
}), uo = c(() => ({
|
|
107
|
+
showCancelBtn: e(Z),
|
|
108
|
+
okText: e(oo),
|
|
109
|
+
cancelText: e(eo),
|
|
110
|
+
okButtonProps: e(b),
|
|
111
|
+
cancelButtonProps: e(to),
|
|
112
|
+
confirmLoading: e(so),
|
|
113
|
+
cancelLoading: e(ro),
|
|
114
|
+
showOkBtn: e(io)
|
|
115
|
+
})), A = c(() => {
|
|
104
116
|
var l, _;
|
|
105
|
-
const
|
|
106
|
-
return
|
|
117
|
+
const o = (l = e(b)) == null ? void 0 : l.disabled, s = e(V), a = (_ = e(b)) == null ? void 0 : _.disabledTip, r = Array.isArray(a) ? a : a ? [a] : [];
|
|
118
|
+
return o || s ? [!0, r] : [!1, []];
|
|
107
119
|
});
|
|
108
120
|
R(
|
|
109
121
|
() => {
|
|
110
|
-
var
|
|
111
|
-
return (
|
|
122
|
+
var o;
|
|
123
|
+
return (o = g.value) == null ? void 0 : o.visible;
|
|
112
124
|
},
|
|
113
|
-
(
|
|
125
|
+
(o) => {
|
|
114
126
|
var s;
|
|
115
|
-
|
|
127
|
+
o !== T.value && (v("visible-change", !!o), v("update:visible", !!o)), t && ((s = f.emitVisible) == null || s.call(f, !!o, t == null ? void 0 : t.uid)), t != null && t.uid && (o ? Ko({ uid: t.uid, close: () => i.onClosed() }) : W(t.uid)), o || i.changeOkLoading(!1);
|
|
116
128
|
},
|
|
117
129
|
{
|
|
118
130
|
immediate: !1
|
|
119
131
|
}
|
|
120
132
|
), R(
|
|
121
|
-
() =>
|
|
122
|
-
(
|
|
133
|
+
() => e(T),
|
|
134
|
+
(o) => {
|
|
123
135
|
var s;
|
|
124
|
-
|
|
136
|
+
o !== ((s = g.value) == null ? void 0 : s.visible) && i.setState({ visible: o }), o || i.changeOkLoading(!1);
|
|
125
137
|
},
|
|
126
138
|
{
|
|
127
139
|
immediate: !1
|
|
128
140
|
}
|
|
129
141
|
);
|
|
130
|
-
function
|
|
131
|
-
M.value =
|
|
142
|
+
function mo(o) {
|
|
143
|
+
M.value = o;
|
|
132
144
|
}
|
|
133
|
-
function
|
|
145
|
+
function fo() {
|
|
134
146
|
document.querySelectorAll(".el-select__popper").forEach((s) => {
|
|
135
147
|
s.style.display !== "none" && (s.style.display = "none");
|
|
136
148
|
});
|
|
137
149
|
}
|
|
138
|
-
function C(
|
|
139
|
-
return
|
|
150
|
+
function C(o) {
|
|
151
|
+
return o.toLowerCase().includes("modal") ? o : `modal-${o}`;
|
|
140
152
|
}
|
|
141
|
-
function
|
|
142
|
-
const
|
|
143
|
-
return
|
|
153
|
+
function go() {
|
|
154
|
+
const o = d["data-testid"] || d.dataTestid || d.testId || d["test-id"];
|
|
155
|
+
return o && typeof o == "string" ? o : void 0;
|
|
144
156
|
}
|
|
145
|
-
const h =
|
|
157
|
+
const h = c(() => {
|
|
146
158
|
var l;
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
return C(
|
|
159
|
+
const o = (l = g.value) == null ? void 0 : l.testId;
|
|
160
|
+
if (o)
|
|
161
|
+
return C(o);
|
|
150
162
|
const s = n.testId;
|
|
151
163
|
if (s)
|
|
152
164
|
return C(s);
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
return C(
|
|
156
|
-
const r =
|
|
157
|
-
return r && typeof r == "string" && r.trim() ? I("modal",
|
|
158
|
-
}),
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
setModalProps:
|
|
165
|
+
const a = go();
|
|
166
|
+
if (a)
|
|
167
|
+
return C(a);
|
|
168
|
+
const r = e(w);
|
|
169
|
+
return r && typeof r == "string" && r.trim() ? I("modal", xo(r)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
|
|
170
|
+
}), bo = c(() => I(h.value, "footer")), ho = c(() => I(h.value, "body"));
|
|
171
|
+
Bo("modalIdContext", h);
|
|
172
|
+
const f = yo({
|
|
173
|
+
setModalProps: i.setState,
|
|
162
174
|
emitVisible: void 0,
|
|
163
175
|
redoModalHeight: () => {
|
|
164
|
-
|
|
165
|
-
|
|
176
|
+
Po(() => {
|
|
177
|
+
e(m) && e(m).setModalHeight();
|
|
166
178
|
});
|
|
167
179
|
},
|
|
168
180
|
scrollToBottom: () => {
|
|
169
|
-
var
|
|
170
|
-
|
|
181
|
+
var o;
|
|
182
|
+
e(m) && ((o = e(m)) == null || o.onScrollBottom());
|
|
171
183
|
}
|
|
172
184
|
});
|
|
173
|
-
return t && v("register",
|
|
174
|
-
const
|
|
175
|
-
|
|
185
|
+
return t && v("register", f, `${t == null ? void 0 : t.uid}`), $o(() => {
|
|
186
|
+
const o = O(d, ["onVisibleChange", "onClosed", "onOk"]);
|
|
187
|
+
i.mount(
|
|
176
188
|
{
|
|
177
|
-
...
|
|
178
|
-
onClosed:
|
|
189
|
+
...o,
|
|
190
|
+
onClosed: o.onClosed || d.onCancel || d.onClose
|
|
179
191
|
},
|
|
180
|
-
|
|
192
|
+
f
|
|
181
193
|
);
|
|
182
|
-
}),
|
|
194
|
+
}), Io(() => {
|
|
183
195
|
t != null && t.uid && W(t.uid);
|
|
184
196
|
}), q({
|
|
185
|
-
modalApi:
|
|
186
|
-
}), (
|
|
187
|
-
var
|
|
188
|
-
return
|
|
189
|
-
"aria-tt-id": `tt-id-${(
|
|
197
|
+
modalApi: i
|
|
198
|
+
}), (o, s) => {
|
|
199
|
+
var a;
|
|
200
|
+
return Oo((wo(), Mo("div", {
|
|
201
|
+
"aria-tt-id": `tt-id-${(a = e(t)) == null ? void 0 : a.uid}`,
|
|
190
202
|
"data-testid": h.value
|
|
191
203
|
}, [
|
|
192
|
-
k(
|
|
193
|
-
class: ["tt-ui-modal",
|
|
194
|
-
"before-close":
|
|
195
|
-
"close-icon": () =>
|
|
204
|
+
k(e(_o), j(co.value, {
|
|
205
|
+
class: ["tt-ui-modal", e(U)],
|
|
206
|
+
"before-close": e(i).onClosed,
|
|
207
|
+
"close-icon": () => So(e(Vo), {
|
|
196
208
|
size: 16,
|
|
197
|
-
icon:
|
|
209
|
+
icon: e(Uo),
|
|
198
210
|
isCustomSvg: !0
|
|
199
211
|
})
|
|
200
212
|
}), y({
|
|
201
|
-
default:
|
|
202
|
-
k(
|
|
213
|
+
default: p(() => [
|
|
214
|
+
k(Wo, {
|
|
203
215
|
ref_key: "modalWrapperRef",
|
|
204
|
-
ref:
|
|
205
|
-
"is-bottom":
|
|
206
|
-
height:
|
|
207
|
-
loading:
|
|
208
|
-
"loading-tip":
|
|
209
|
-
class:
|
|
210
|
-
"data-testid":
|
|
211
|
-
onIsScroll:
|
|
216
|
+
ref: m,
|
|
217
|
+
"is-bottom": e(D),
|
|
218
|
+
height: e(ao),
|
|
219
|
+
loading: e(V),
|
|
220
|
+
"loading-tip": e(lo),
|
|
221
|
+
class: Fo({ "pb-2!": !e(z) }),
|
|
222
|
+
"data-testid": ho.value,
|
|
223
|
+
onIsScroll: mo
|
|
212
224
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
|
|
225
|
+
default: p(() => [
|
|
226
|
+
u(o.$slots, "default")
|
|
215
227
|
]),
|
|
216
228
|
_: 3
|
|
217
229
|
}, 8, ["is-bottom", "height", "loading", "loading-tip", "class", "data-testid"])
|
|
218
230
|
]),
|
|
219
231
|
_: 2
|
|
220
232
|
}, [
|
|
221
|
-
|
|
233
|
+
o.$slots.header ? {
|
|
222
234
|
name: "header",
|
|
223
|
-
fn:
|
|
224
|
-
|
|
235
|
+
fn: p(() => [
|
|
236
|
+
u(o.$slots, "header")
|
|
225
237
|
]),
|
|
226
238
|
key: "1"
|
|
227
239
|
} : {
|
|
228
240
|
name: "header",
|
|
229
|
-
fn:
|
|
230
|
-
k(
|
|
231
|
-
title:
|
|
232
|
-
onMousedown:
|
|
241
|
+
fn: p(() => [
|
|
242
|
+
k(Ho, {
|
|
243
|
+
title: e(w),
|
|
244
|
+
onMousedown: fo
|
|
233
245
|
}, y({
|
|
234
|
-
titleToolbar:
|
|
235
|
-
|
|
246
|
+
titleToolbar: p(() => [
|
|
247
|
+
u(o.$slots, "titleToolbar")
|
|
236
248
|
]),
|
|
237
249
|
_: 2
|
|
238
250
|
}, [
|
|
239
|
-
B(Object.keys(
|
|
251
|
+
B(Object.keys(o.$slots), (r) => ({
|
|
240
252
|
name: r,
|
|
241
|
-
fn:
|
|
242
|
-
|
|
253
|
+
fn: p((l) => [
|
|
254
|
+
u(o.$slots, r, P($(l || {})))
|
|
243
255
|
])
|
|
244
256
|
}))
|
|
245
257
|
]), 1032, ["title"])
|
|
246
258
|
]),
|
|
247
259
|
key: "0"
|
|
248
260
|
},
|
|
249
|
-
|
|
261
|
+
e(G).footer || e(z) ? {
|
|
250
262
|
name: "footer",
|
|
251
|
-
fn:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
k(
|
|
263
|
+
fn: p(() => [
|
|
264
|
+
u(o.$slots, "footer", {}, () => [
|
|
265
|
+
Do("div", { "data-testid": bo.value }, [
|
|
266
|
+
k(Eo, j(uo.value, {
|
|
255
267
|
class: "footer",
|
|
256
268
|
style: { borderTop: M.value ? "1px solid var(--tt-modal-footer-border-color)" : "none" },
|
|
257
269
|
"ok-button-props": {
|
|
258
|
-
...
|
|
270
|
+
...e(b),
|
|
259
271
|
disabledTip: A.value[1],
|
|
260
272
|
disabled: A.value[0]
|
|
261
273
|
},
|
|
262
|
-
onFooterok:
|
|
263
|
-
onCancel:
|
|
274
|
+
onFooterok: e(i).onOk,
|
|
275
|
+
onCancel: e(i).onClosed
|
|
264
276
|
}), y({ _: 2 }, [
|
|
265
277
|
B(Object.keys(
|
|
266
|
-
|
|
278
|
+
e(O)(o.$slots, ["beforeFooter", "insertFooter", "centerFooter", "appendFooter"])
|
|
267
279
|
), (r) => ({
|
|
268
280
|
name: r,
|
|
269
|
-
fn:
|
|
270
|
-
|
|
281
|
+
fn: p((l) => [
|
|
282
|
+
u(o.$slots, r, P($({ ...l || {} })))
|
|
271
283
|
])
|
|
272
284
|
}))
|
|
273
285
|
]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
|
|
274
|
-
], 8,
|
|
286
|
+
], 8, Jo)
|
|
275
287
|
])
|
|
276
288
|
]),
|
|
277
289
|
key: "2"
|
|
278
290
|
} : void 0,
|
|
279
291
|
B(Object.keys(
|
|
280
|
-
|
|
292
|
+
e(H)(o.$slots, [
|
|
281
293
|
"default",
|
|
282
294
|
"titleToolbar",
|
|
283
295
|
"header",
|
|
@@ -289,22 +301,22 @@ const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE_
|
|
|
289
301
|
])
|
|
290
302
|
), (r) => ({
|
|
291
303
|
name: r,
|
|
292
|
-
fn:
|
|
293
|
-
|
|
304
|
+
fn: p((l) => [
|
|
305
|
+
u(o.$slots, r, P($(l || {})))
|
|
294
306
|
])
|
|
295
307
|
}))
|
|
296
308
|
]), 1040, ["class", "before-close", "close-icon"])
|
|
297
|
-
], 8,
|
|
298
|
-
[
|
|
299
|
-
draggable:
|
|
300
|
-
fullscreen:
|
|
301
|
-
resizer:
|
|
302
|
-
resizeChange:
|
|
309
|
+
], 8, Go)), [
|
|
310
|
+
[e(Ro), {
|
|
311
|
+
draggable: e(Y),
|
|
312
|
+
fullscreen: e(J),
|
|
313
|
+
resizer: e(Q),
|
|
314
|
+
resizeChange: e(d).resizeChange
|
|
303
315
|
}]
|
|
304
316
|
]);
|
|
305
317
|
};
|
|
306
318
|
}
|
|
307
319
|
});
|
|
308
320
|
export {
|
|
309
|
-
|
|
321
|
+
Be as default
|
|
310
322
|
};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import { defineComponent as h, inject as v, computed as
|
|
1
|
+
import { defineComponent as h, inject as v, computed as a, unref as e, createElementBlock as b, openBlock as n, createElementVNode as F, createVNode as P, renderSlot as o, withCtx as i, createBlock as s, createCommentVNode as l, mergeProps as d, withModifiers as c, createTextVNode as p, toDisplayString as m } from "vue";
|
|
2
2
|
import { TtButton as u } from "../../../tt-button/index.js";
|
|
3
|
-
import
|
|
3
|
+
import "axios";
|
|
4
4
|
import { ElSpace as w } from "element-plus";
|
|
5
|
+
import "dayjs";
|
|
6
|
+
import { generateTestId as f } from "../../../../packages/utils/src/testid-helper.js";
|
|
7
|
+
import "xe-utils";
|
|
8
|
+
import "dayjs/plugin/utc";
|
|
9
|
+
import "dayjs/plugin/timezone";
|
|
10
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
5
15
|
import { pick as y } from "lodash-es";
|
|
6
16
|
import { basicProps as I } from "../props.js";
|
|
7
|
-
const $ = { class: "flex" }, L = { class: "flex-1" },
|
|
17
|
+
const $ = { class: "flex" }, L = { class: "flex-1" }, W = /* @__PURE__ */ h({
|
|
8
18
|
name: "TtModalFooter",
|
|
9
19
|
__name: "ModalFooter",
|
|
10
20
|
props: y(I, [
|
|
@@ -19,50 +29,50 @@ const $ = { class: "flex" }, L = { class: "flex-1" }, D = /* @__PURE__ */ h({
|
|
|
19
29
|
]),
|
|
20
30
|
emits: ["cancel"],
|
|
21
31
|
setup(N, { emit: k }) {
|
|
22
|
-
const B = k,
|
|
23
|
-
function C(
|
|
24
|
-
B("cancel",
|
|
32
|
+
const B = k, r = v("modalIdContext", ""), T = a(() => f(e(r), "btn-confirm")), g = a(() => f(e(r), "btn-cancel"));
|
|
33
|
+
function C(t) {
|
|
34
|
+
B("cancel", t);
|
|
25
35
|
}
|
|
26
|
-
return (
|
|
36
|
+
return (t, V) => (n(), b("div", $, [
|
|
27
37
|
F("div", L, [
|
|
28
|
-
o(
|
|
38
|
+
o(t.$slots, "beforeFooter", {}, void 0, !0)
|
|
29
39
|
]),
|
|
30
|
-
P(
|
|
40
|
+
P(e(w), {
|
|
31
41
|
size: 12,
|
|
32
42
|
class: "flex items-center justify-end"
|
|
33
43
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
o(
|
|
36
|
-
|
|
44
|
+
default: i(() => [
|
|
45
|
+
o(t.$slots, "insertFooter", {}, void 0, !0),
|
|
46
|
+
t.showCancelBtn ? (n(), s(e(u), d({
|
|
37
47
|
key: 0,
|
|
38
|
-
loading:
|
|
39
|
-
},
|
|
40
|
-
title:
|
|
48
|
+
loading: t.cancelLoading
|
|
49
|
+
}, t.cancelButtonProps, {
|
|
50
|
+
title: t.cancelText,
|
|
41
51
|
"data-testid": g.value,
|
|
42
52
|
onClick: c(C, ["stop"])
|
|
43
53
|
}), {
|
|
44
|
-
default:
|
|
45
|
-
p(m(
|
|
54
|
+
default: i(() => [
|
|
55
|
+
p(m(t.cancelText), 1)
|
|
46
56
|
]),
|
|
47
57
|
_: 1
|
|
48
58
|
}, 16, ["loading", "title", "data-testid"])) : l("", !0),
|
|
49
|
-
o(
|
|
50
|
-
|
|
59
|
+
o(t.$slots, "centerFooter", {}, void 0, !0),
|
|
60
|
+
t.showOkBtn ? (n(), s(e(u), d({
|
|
51
61
|
key: 1,
|
|
52
|
-
"disabled-tip":
|
|
62
|
+
"disabled-tip": t.okButtonProps.disabledTip,
|
|
53
63
|
type: "primary"
|
|
54
|
-
},
|
|
55
|
-
loading:
|
|
56
|
-
title:
|
|
64
|
+
}, t.okButtonProps, {
|
|
65
|
+
loading: t.confirmLoading,
|
|
66
|
+
title: t.okText,
|
|
57
67
|
"data-testid": T.value,
|
|
58
|
-
onClick: c(
|
|
68
|
+
onClick: c(t.$attrs.onFooterok, ["stop"])
|
|
59
69
|
}), {
|
|
60
|
-
default:
|
|
61
|
-
p(m(
|
|
70
|
+
default: i(() => [
|
|
71
|
+
p(m(t.okText), 1)
|
|
62
72
|
]),
|
|
63
73
|
_: 1
|
|
64
74
|
}, 16, ["disabled-tip", "loading", "title", "data-testid", "onClick"])) : l("", !0),
|
|
65
|
-
o(
|
|
75
|
+
o(t.$slots, "appendFooter", {}, void 0, !0)
|
|
66
76
|
]),
|
|
67
77
|
_: 3
|
|
68
78
|
})
|
|
@@ -70,5 +80,5 @@ const $ = { class: "flex" }, L = { class: "flex-1" }, D = /* @__PURE__ */ h({
|
|
|
70
80
|
}
|
|
71
81
|
});
|
|
72
82
|
export {
|
|
73
|
-
|
|
83
|
+
W as default
|
|
74
84
|
};
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { propTypes as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as i, createElementBlock as p, openBlock as m, normalizeClass as s, unref as l, createTextVNode as a, renderSlot as o, toDisplayString as n } from "vue";
|
|
2
|
+
import { propTypes as d } from "../../../../packages/hooks/src/propTypes.js";
|
|
3
|
+
import { useDesign as c } from "../../../../packages/hooks/src/useDesign.js";
|
|
4
|
+
import "axios";
|
|
5
|
+
import "element-plus";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import "xe-utils";
|
|
8
|
+
import "dayjs/plugin/utc";
|
|
9
|
+
import "dayjs/plugin/timezone";
|
|
10
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
+
import "lodash-es";
|
|
16
|
+
const x = /* @__PURE__ */ i({
|
|
4
17
|
__name: "ModalHeader",
|
|
5
18
|
props: {
|
|
6
19
|
/** 标题 */
|
|
7
|
-
title:
|
|
20
|
+
title: d.string
|
|
8
21
|
},
|
|
9
|
-
setup(
|
|
22
|
+
setup(e) {
|
|
10
23
|
const { prefixCls: r } = c("modal-header");
|
|
11
|
-
return (
|
|
12
|
-
class:
|
|
24
|
+
return (t, f) => (m(), p("div", {
|
|
25
|
+
class: s(l(r))
|
|
13
26
|
}, [
|
|
14
|
-
|
|
15
|
-
t
|
|
16
|
-
t
|
|
27
|
+
a(n(t.$slots.title ? "" : e.title) + " ", 1),
|
|
28
|
+
o(t.$slots, "titleToolbar", {}, void 0, !0),
|
|
29
|
+
o(t.$slots, "appendHeader", {}, void 0, !0)
|
|
17
30
|
], 2));
|
|
18
31
|
}
|
|
19
32
|
});
|
|
20
33
|
export {
|
|
21
|
-
|
|
34
|
+
x as default
|
|
22
35
|
};
|